Loading ...
Sorry, an error occurred while loading the content.
 

Re: Text edit versus vi on some files

Expand Messages
  • Chris Eidhof
    I ve got the following lines in my .vimrc: set encoding=utf8 set fileencoding=utf8 That works like a charm for me. Good luck,
    Message 1 of 3 , Sep 18, 2006
      I've got the following lines in my .vimrc:

      set encoding=utf8
      set fileencoding=utf8

      That works like a charm for me.

      Good luck,
      > Can vi handle this type of file? If so, how?
      >
      > Since this seems to be related to the file type,
      > can somebody point me at a 'Unicode for dummies' document?
    • Ned Konz
      ... Yes. If you have your fileencodings set right, it should just work. Try (in your .vimrc) set fileencodings=ucs-bom,utf-8,default,latin1 if you have
      Message 2 of 3 , Sep 20, 2006
        Brian McKee wrote:
        > -----BEGIN PGP SIGNED MESSAGE-----
        > Hash: SHA1
        >
        > This should be reproducable on any Mac
        >>
        >> cd /Applications/iTunes.app/Contents/Resources/English.lproj
        >> file Localizable.strings
        >> Localizable.strings: Big-endian UTF-16 Unicode C program character data
        >
        > If I open that file in vim I get
        > ??^@/^@*^@ ^@=^@=^@=^@=^@=^@ ^@F^@i^@l^@e^@n^@a^@m^@e^@s
        > but Text Edit displays it correctly.
        >
        > Can vi handle this type of file? If so, how?

        Yes. If you have your "fileencodings" set right, it should just work.

        Try (in your .vimrc)

        set fileencodings=ucs-bom,utf-8,default,latin1

        if you have ucs-bom,utf-8 at the beginning of fileencodings then the
        marker bytes that are at the beginning of the Unicode files will be used
        to decide on 'fileencoding'.

        --
        Ned Konz
        ned@...
        http://bike-nomad.com
      Your message has been successfully submitted and would be delivered to recipients shortly.