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

On 18-Sep-06, at 8:46 PM, A.J.Mechelynck wrote:

Brian McKee wrote:
-----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 :)
{snippage}
Your example looks like UTF-16 (or UCS-2) text, i.e. Unicode encoded at two bytes per character for most characters. Such text may contain characters (Chinese, Russian, Hebrew, Greek, Arabic, whatever) which canot be represented in latin1. I suggest the following (in gvim):

        if &termencoding == ""
                let &termencoding = &encoding
        endif
        set encoding=utf-8
        set fileencodings=ucs-bom,utf-8,latin1
{snippage}

Thanks Tony (and Elliot and Ned) for your replies,
I've been off sick for a couple of days so I'll revisit this when I get out from under the pile.

FWIW my $LANG is empty, and the last time I used a ~/.MacOSX/ environment.plist I got the coolest OSX bug I've ever seen - after an Apple update (as near as I can tell by the timing) my home folder was suddenly read only..... If you knew how long I spent trouble shooting that you'd know why I'm not going there again :-)

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

iD8DBQFFEtRoGnOmb9xIQHQRAtK0AJ9ycLB3nbGTFBvE70IJ1KokebHU3QCeNDcU
vJJSigH2P9QepW/6QCi4Cg4=
=9hUj
-----END PGP SIGNATURE-----

Reply via email to