patch 8.1.2003: MS-Windows: code page 65001 is not recognized
Problem: MS-Windows: code page 65001 is not recognized.
Solution: Use utf-8 for code page 65001. (Dan Thompson, closes #4902)
diff --git a/src/mbyte.c b/src/mbyte.c
index 808194f..ff23ab6 100644
--- a/src/mbyte.c
+++ b/src/mbyte.c
@@ -4468,8 +4468,10 @@
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);