limit ToUCS2 only have effect in U+0080 to U+009F range so it won't mess up non Latin 1 characters

git-svn-id: svn://10.0.0.236/trunk@19020 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
ftang%netscape.com
1999-01-29 18:08:36 +00:00
parent dc85c6215a
commit 339d983050
4 changed files with 8 additions and 4 deletions

View File

@@ -468,7 +468,8 @@ void nsString::ToUCS2(PRInt32 aStartOffset){
chartype* end = cp + mLength;
while (cp < end) {
unsigned char ch = (unsigned char)*cp;
*cp=gToUCS2[ch];
if( 0x0080 == (0xFFE0 & (*cp)) ) // limit to only 0x0080 to 0x009F
*cp=gToUCS2[ch];
cp++;
}
}