4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=ISO-8859-1
7 Content-Transfer-Encoding: 8bit
11 Problem: When detecting a little endian BOM "ucs-2le" is used, but the text
13 Solution: Default to "utf-16le", it also works for "ucs-2le". (Jia Yanwei)
14 Files: src/fileio.c, src/testdir/test42.ok
17 *** ../vim-7.2.032/src/fileio.c Sun Nov 9 13:43:25 2008
18 --- src/fileio.c Mon Nov 3 21:21:47 2008
21 name = "ucs-4le"; /* FF FE 00 00 */
24 ! else if (flags == FIO_ALL || flags == (FIO_UCS2 | FIO_ENDIAN_L))
25 name = "ucs-2le"; /* FF FE */
26 ! else if (flags == (FIO_UTF16 | FIO_ENDIAN_L))
27 name = "utf-16le"; /* FF FE */
29 else if (p[0] == 0xfe && p[1] == 0xff
31 name = "ucs-4le"; /* FF FE 00 00 */
34 ! else if (flags == (FIO_UCS2 | FIO_ENDIAN_L))
35 name = "ucs-2le"; /* FF FE */
36 ! else if (flags == FIO_ALL || flags == (FIO_UTF16 | FIO_ENDIAN_L))
37 ! /* utf-16le is preferred, it also works for ucs-2le text */
38 name = "utf-16le"; /* FF FE */
40 else if (p[0] == 0xfe && p[1] == 0xff
41 *** ../vim-7.2.032/src/testdir/test42.ok Sat Mar 1 13:49:21 2008
42 --- src/testdir/test42.ok Sat Nov 1 17:09:29 2008
48 ! fileencoding=ucs-2le
56 ! fileencoding=utf-16le
60 *** ../vim-7.2.032/src/version.c Sun Nov 9 17:21:10 2008
61 --- src/version.c Tue Nov 11 21:54:14 2008
65 { /* Add new patch number below this line */
71 hundred-and-one symptoms of being an internet addict:
72 234. You started college as a chemistry major, and walk out four years
73 later as an Internet provider.
75 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
76 /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
77 \\\ download, build and distribute -- http://www.A-A-P.org ///
78 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///