-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 18-Sep-06, at 11:56 AM, David Morel wrote:

Brian McKee a écrit :
file Localizable.strings
Localizable.strings: Big-endian UTF-16 Unicode C program character data
If I open that file in vim I get
??^@/[EMAIL PROTECTED]@ [EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@ 
[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL 
PROTECTED]
but Text Edit displays it correctly.
Can vi handle this type of file?  If so, how?
in vim, type :h multibyte
that should get you started :)

Eeeek - started right around the bend I think :-)
Biggest issue from my current point of view is it studiously ignores Mac OS...

Chris Eidhof suggested
set encoding=utf8
set fileencoding=utf8

which works if you set it before you open the file in question.
Interestingly =utf16 'works' too... or at least it shows plain ASCII type lettering ok.

Between those ideas I've decided to leave things alone and just do a
   :e ++enc=utf16
whenever I see lots of alternating @ signs and letters :-)
I think I'd prefer leaving my standard encoding at latin1 to match the linux
boxes I'm often working on at the same time.

Am I right in understanding that Apple's TextEdit must be automatically
detecting UTF16 files and changing it's base encoding to match?

And is there some way that vi could do the same?

Brian
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Darwin)

iD8DBQFFDuvUGnOmb9xIQHQRAi6hAJ9858onQRWXR+kByXCcm/Cpk631bACg2cbB
e2JH8drOIyERomjI7zpPTn0=
=Wa4n
-----END PGP SIGNATURE-----

Reply via email to