aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2008-10-09 22:05:43 +0000
committernyamatongwe <devnull@localhost>2008-10-09 22:05:43 +0000
commit8723b946e90e0d793a24adf62d0b453e15e086a1 (patch)
treea66bb1c0bab9c499ad4c1a7c7a38d38c1b6f4441
parent3751deea7b3fca18e67f60556b7369810f75ac23 (diff)
downloadscintilla-mirror-8723b946e90e0d793a24adf62d0b453e15e086a1.tar.gz
Fix for #2153429 by Jason Oster. UTF-8 text could be chopped up.
-rw-r--r--src/LexCSS.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/LexCSS.cxx b/src/LexCSS.cxx
index f6757c46f..3b139cdcd 100644
--- a/src/LexCSS.cxx
+++ b/src/LexCSS.cxx
@@ -28,7 +28,12 @@ using namespace Scintilla;
static inline bool IsAWordChar(const unsigned int ch) {
- return (isalnum(ch) || ch == '-' || ch == '_' || ch >= 161); // _ is not in fact correct CSS word-character
+ /* FIXME:
+ * The CSS spec allows "ISO 10646 characters U+00A1 and higher" to be treated as word chars.
+ * Unfortunately, we are only getting string bytes here, and not full unicode characters. We cannot guarantee
+ * that our byte is between U+0080 - U+00A0 (to return false), so we have to allow all characters U+0080 and higher
+ */
+ return ch >= 0x80 || isalnum(ch) || ch == '-' || ch == '_';
}
inline bool IsCssOperator(const int ch) {