Bug 343741. Don't pass Unicode characters to isspace etc libc methods, they die on Windows. r+sr=mscott

This commit is contained in:
roc+%cs.cmu.edu 2006-07-13 08:10:30 +00:00
Родитель 1d2505ffa1
Коммит c011fcedb2
1 изменённых файлов: 6 добавлений и 0 удалений

Просмотреть файл

@ -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