diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-02-22 12:34:28 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-02-22 12:34:28 +0000 |
commit | 1349bd712cf7d24dc65408c523dd7deb30224f80 (patch) | |
tree | 4169f9aabfde7d4df808d2f9d5c5611d87626379 /src/mbyte.c | |
parent | ca0c1caa36823ea8e61184268d7337e79995352f (diff) | |
download | vim-git-1349bd712cf7d24dc65408c523dd7deb30224f80.tar.gz |
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.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mbyte.c b/src/mbyte.c index 2f4edd53a..78230f65e 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] = '-'; |