diff options
Diffstat (limited to 'native/jni/src/char_utils.h')
-rw-r--r-- | native/jni/src/char_utils.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/native/jni/src/char_utils.h b/native/jni/src/char_utils.h index b17f262ec..20cf2e8b5 100644 --- a/native/jni/src/char_utils.h +++ b/native/jni/src/char_utils.h @@ -23,7 +23,9 @@ namespace latinime { inline static bool isAsciiUpper(unsigned short c) { - return isupper(static_cast<int>(c)) != 0; + // Note: isupper(...) reports false positives for some Cyrillic characters, causing them to + // be incorrectly lower-cased using toAsciiLower(...) rather than latin_tolower(...). + return (c >= 'A' && c <= 'Z'); } inline static unsigned short toAsciiLower(unsigned short c) { |