diff --git a/konsole/TEWidget.cpp b/konsole/TEWidget.cpp index 6591d95a..f9cb8552 100644 --- a/konsole/TEWidget.cpp +++ b/konsole/TEWidget.cpp @@ -989,15 +989,12 @@ bool TEWidget::focusNextPrevChild( bool next ) } -int TEWidget::charClass(char ch) const +int TEWidget::charClass(UINT16 ch) const { - // This might seem like overkill, but imagine if ch was a Unicode - // character (Qt 2.0 QChar) - it might then be sensible to separate - // the different language ranges, etc. + QChar qch=QChar(ch); + if ( qch.isSpace() ) return ' '; - if ( isspace(ch) ) return ' '; - - if ( isalnum(ch) || word_characters.contains(ch) ) + if ( qch.isLetterOrNumber() || word_characters.contains(qch, FALSE) ) return 'a'; // Everything else is weird diff --git a/konsole/TEWidget.h b/konsole/TEWidget.h index 11a28d8a..80c4f09f 100644 --- a/konsole/TEWidget.h +++ b/konsole/TEWidget.h @@ -133,7 +133,7 @@ protected: void dropEvent(QDropEvent* event); - virtual int charClass(char) const; + virtual int charClass(UINT16) const; void clearImage();