changeset 1547:e72e30c69d58 v7.1.261

updated for version 7.1-261
author vimboss
date Wed, 20 Feb 2008 17:15:26 +0000
parents 75f5889a5d8e
children 8d74df00f7da
files src/fileio.c src/testdir/test42.ok src/version.c
diffstat 3 files changed, 6 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -5514,10 +5514,11 @@ check_for_bom(p, size, lenp, flags)
     else if (p[0] == 0xfe && p[1] == 0xff
 	    && (flags == FIO_ALL || flags == FIO_UCS2 || flags == FIO_UTF16))
     {
-	if (flags == FIO_UTF16)
+	/* Default to utf-16, it works also for ucs-2 text. */
+	if (flags == FIO_UCS2)
+	    name = "ucs-2";	/* FE FF */
+	else
 	    name = "utf-16";	/* FE FF */
-	else
-	    name = "ucs-2";	/* FE FF */
     }
     else if (size >= 4 && p[0] == 0 && p[1] == 0 && p[2] == 0xfe
 	    && p[3] == 0xff && (flags == FIO_ALL || flags == FIO_UCS4))
index 16f41e46e0c9430df4c0672a13c3fb531b1e1ff7..643b75bc9690d2a3e0d1fe9782c30675919be962
GIT binary patch
literal 310
zc%0+nQcy_C%t=knOU_Tp%uBb;Ni50CGvvz4Ps-0t;`;Xw%-1#K;zCzgT9T$~0TcwQ
zgK#j^pc?jm_kOUthSZ`W?B*Go!3|6<)-}SS2qc`7ilPe0#j4H(S(OP6HK=BRxCk%9
S+{<-%{h{55AnZe6#{&SA=4to<
--- a/src/version.c
+++ b/src/version.c
@@ -667,6 +667,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    261,
+/**/
     260,
 /**/
     259,