Mercurial > vim
changeset 1735:35abb7026415 v7.2.033
updated for version 7.2-033
author | vimboss |
---|---|
date | Tue, 11 Nov 2008 20:57:11 +0000 |
parents | 619b90abfdc9 |
children | fe52f9888eaa |
files | src/fileio.c src/testdir/test42.ok src/version.c |
diffstat | 3 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/fileio.c +++ b/src/fileio.c @@ -5550,9 +5550,10 @@ check_for_bom(p, size, lenp, flags) name = "ucs-4le"; /* FF FE 00 00 */ len = 4; } - else if (flags == FIO_ALL || flags == (FIO_UCS2 | FIO_ENDIAN_L)) + else if (flags == (FIO_UCS2 | FIO_ENDIAN_L)) name = "ucs-2le"; /* FF FE */ - else if (flags == (FIO_UTF16 | FIO_ENDIAN_L)) + else if (flags == FIO_ALL || flags == (FIO_UTF16 | FIO_ENDIAN_L)) + /* utf-16le is preferred, it also works for ucs-2le text */ name = "utf-16le"; /* FF FE */ } else if (p[0] == 0xfe && p[1] == 0xff