зеркало из https://github.com/mozilla/gecko-dev.git
limit ToUCS2 only have effect in U+0080 to U+009F range so it won't mess up non Latin 1 characters
This commit is contained in:
Родитель
a603db7c59
Коммит
06132c62e3
|
@ -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++;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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++;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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++;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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++;
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче