summaryrefslogtreecommitdiffstats
path: root/src/mbyte.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-02-22 12:34:28 +0000
committerBram Moolenaar <Bram@vim.org>2022-02-22 12:34:28 +0000
commit1349bd712cf7d24dc65408c523dd7deb30224f80 (patch)
tree4169f9aabfde7d4df808d2f9d5c5611d87626379 /src/mbyte.c
parentca0c1caa36823ea8e61184268d7337e79995352f (diff)
patch 8.2.4439: accepting "iso8859" 'encoding' as "iso-8859-"v8.2.4439
Problem: Accepting "iso8859" 'encoding' as "iso-8859-". Solution: use "iso8859" as "iso-8859-1".
Diffstat (limited to 'src/mbyte.c')
-rw-r--r--src/mbyte.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mbyte.c b/src/mbyte.c
index 2f4edd53af..78230f65e7 100644
--- a/src/mbyte.c
+++ b/src/mbyte.c
@@ -318,6 +318,7 @@ enc_alias_table[] =
{
{"ansi", IDX_LATIN_1},
{"iso-8859-1", IDX_LATIN_1},
+ {"iso-8859", IDX_LATIN_1},
{"latin2", IDX_ISO_2},
{"latin3", IDX_ISO_3},
{"latin4", IDX_ISO_4},
@@ -4523,7 +4524,7 @@ enc_canonize(char_u *enc)
}
// "iso-8859n" -> "iso-8859-n"
- if (STRNCMP(p, "iso-8859", 8) == 0 && p[8] != '-')
+ if (STRNCMP(p, "iso-8859", 8) == 0 && isdigit(p[8]))
{
STRMOVE(p + 9, p + 8);
p[8] = '-';