]> granicus.if.org Git - vim/commitdiff
patch 8.1.2003: MS-Windows: code page 65001 is not recognized v8.1.2003
authorBram Moolenaar <Bram@vim.org>
Sat, 7 Sep 2019 14:07:47 +0000 (16:07 +0200)
committerBram Moolenaar <Bram@vim.org>
Sat, 7 Sep 2019 14:07:47 +0000 (16:07 +0200)
Problem:    MS-Windows: code page 65001 is not recognized.
Solution:   Use utf-8 for code page 65001. (Dan Thompson, closes #4902)

src/mbyte.c
src/version.c

index 808194f792a308ed674e47dc79ad73cfd556e4fa..ff23ab6afa01d2f7b97e4fcee3dc36333d6ef8b2 100644 (file)
@@ -4468,8 +4468,10 @@ enc_locale(void)
 
     if (acp == 1200)
        STRCPY(buf, "ucs-2le");
-    else if (acp == 1252)          /* cp1252 is used as latin1 */
+    else if (acp == 1252)          // cp1252 is used as latin1
        STRCPY(buf, "latin1");
+    else if (acp == 65001)
+       STRCPY(buf, "utf-8");
     else
        sprintf(buf, "cp%ld", acp);
 
index 7f3310e2c62df668be341cd4eab68250d892aa79..80976779af916ae26c8792355202d35baf31b37c 100644 (file)
@@ -757,6 +757,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2003,
 /**/
     2002,
 /**/