зеркало из https://github.com/mozilla/pjs.git
Bug 343741. Don't pass Unicode characters to isspace etc libc methods, they die on Windows. r+sr=mscott
This commit is contained in:
Родитель
1d2505ffa1
Коммит
c011fcedb2
|
@ -832,6 +832,12 @@ WordSplitState::ClassifyCharacter(PRInt32 aIndex, PRBool aRecurse) const
|
|||
if (charCategory == 5 || IsIgnorableCharacter(mDOMWordText[aIndex]))
|
||||
return CHAR_CLASS_WORD;
|
||||
|
||||
if (mDOMWordText[aIndex] > 255) {
|
||||
// Non-ASCII character so we can't use is* libc functions.
|
||||
// XXX this function needs work to handle general Unicode characters!!!
|
||||
return CHAR_CLASS_WORD;
|
||||
}
|
||||
|
||||
// all other whitespace chars, control chars, and most punctuation (with
|
||||
// several exceptions) are word separators. These exceptions are for
|
||||
// characters that can be considered part of a word if it is surrounded by
|
||||
|
|
Загрузка…
Ссылка в новой задаче