diff options
| author | nyamatongwe <unknown> | 2008-10-09 22:05:43 +0000 | 
|---|---|---|
| committer | nyamatongwe <unknown> | 2008-10-09 22:05:43 +0000 | 
| commit | 9624ba95f4a739da16592f26ced2885da74f79eb (patch) | |
| tree | a66bb1c0bab9c499ad4c1a7c7a38d38c1b6f4441 | |
| parent | 75dd356d41b590ba630ca29317dc2a5189fb5be8 (diff) | |
| download | scintilla-mirror-9624ba95f4a739da16592f26ced2885da74f79eb.tar.gz | |
Fix for #2153429 by Jason Oster. UTF-8 text could be chopped up.
| -rw-r--r-- | src/LexCSS.cxx | 7 | 
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) { | 
