mbyte: replace vim_tolower with mb_tolower handling locale correctly

This commit is contained in:
Björn Linse
2017-04-08 16:45:38 +02:00
parent 3b88e37b83
commit db9ef6263e
16 changed files with 79 additions and 135 deletions

View File

@@ -16802,7 +16802,7 @@ static void f_tolower(typval_T *argvars, typval_T *rettv, FunPtr fptr)
int c, lc;
c = utf_ptr2char(p);
lc = utf_tolower(c);
lc = mb_tolower(c);
l = utf_ptr2len(p);
/* TODO: reallocate string when byte count changes. */
if (utf_char2len(lc) == l)