Avoid locale sensitive tolower in wc_charset_to_ces

This commit is contained in:
Tatsuya Kinoshita
2023-01-06 19:42:04 +09:00
parent df0325c01e
commit dbb708c56f

View File

@@ -111,7 +111,7 @@ wc_charset_to_ces(char *charset)
char buf[16];
int n;
if (tolower(*p) == 'x' && *(p+1) == '-')
if ((*p == 'x' || *p == 'X') && *(p+1) == '-')
p += 2;
for (n = 0; *p && n < 15; p++) {
if ((unsigned char)*p > 0x20 && *p != '_' && *p != '-')