0
0
mirror of https://github.com/vim/vim.git synced 2025-09-26 04:04:07 -04:00

patch 8.0.0554: toupper and tolower don't work properly for Turkish

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.
This commit is contained in:
Bram Moolenaar
2017-04-09 13:41:59 +02:00
parent 9f4de1f543
commit 1cc482069a
3 changed files with 17 additions and 0 deletions

View File

@@ -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