diff --git a/src/corelib/tools/qchar.h b/src/corelib/tools/qchar.h index af50f6dde7..3efa5e511d 100644 --- a/src/corelib/tools/qchar.h +++ b/src/corelib/tools/qchar.h @@ -239,8 +239,14 @@ public: bool isLetterOrNumber() const; bool isDigit() const; bool isSymbol() const; - inline bool isLower() const { return category() == Letter_Lowercase; } - inline bool isUpper() const { return category() == Letter_Uppercase; } + inline bool isLower() const { + return (ucs >= 'a' && ucs <= 'z') + || (ucs > 127 && category(ucs) == Letter_Lowercase); + } + inline bool isUpper() const { + return (ucs <= 'Z' && ucs >= 'A') + || (ucs > 127 && category(ucs) == Letter_Uppercase); + } inline bool isTitleCase() const { return category() == Letter_Titlecase; } inline bool isHighSurrogate() const {