diff options
author | Bram Moolenaar <Bram@vim.org> | 2017-04-09 13:41:59 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2017-04-09 13:41:59 +0200 |
commit | 1cc482069a3407132aeb43a55d6dc284153e79c7 (patch) | |
tree | 704149ab8249608dfd5e6d59ead636b38d533077 /src/charset.c | |
parent | 9f4de1f5435b900e43e19766da1a5bed4686cf44 (diff) | |
download | vim-git-1cc482069a3407132aeb43a55d6dc284153e79c7.tar.gz |
patch 8.0.0554: toupper and tolower don't work properly for Turkishv8.0.0554
Problem: Toupper and tolower don't work properly for Turkish when 'casemap'
contains "keepascii". (Bjorn Linse)
Solution: When 'casemap' contains "keepascii" use ASCII toupper/tolower.
Diffstat (limited to 'src/charset.c')
-rw-r--r-- | src/charset.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/charset.c b/src/charset.c index cdb9e48e4..d649179dd 100644 --- a/src/charset.c +++ b/src/charset.c @@ -1733,6 +1733,8 @@ vim_toupper(int c) if (enc_latin1like) return latin1upper[c]; } + if (c < 0x80 && (cmp_flags & CMP_KEEPASCII)) + return TOUPPER_ASC(c); return TOUPPER_LOC(c); } @@ -1757,6 +1759,8 @@ vim_tolower(int c) if (enc_latin1like) return latin1lower[c]; } + if (c < 0x80 && (cmp_flags & CMP_KEEPASCII)) + return TOLOWER_ASC(c); return TOLOWER_LOC(c); } #endif |