fix the 0x00-0x20 and 0x7f problem nsUnicodeDecodeUtil.cpp
git-svn-id: svn://10.0.0.236/trunk@17729 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
08a09d5e00
commit
4d05a35652
@ -86,7 +86,10 @@ NS_IMETHODIMP nsUnicodeDecodeUtil::Convert(
|
||||
if(uScan(aShiftTable, (PRInt32*) 0, src, &med, srclen, &scanlen)) {
|
||||
uMapCode((uTable*) aMappingTable,med, dest);
|
||||
if(*dest == NOMAPPING) {
|
||||
if(nsIUnicodeDecoder::kOnError_Signal == aBehavior)
|
||||
if((*src < 0x20) || (0x7F == *src))
|
||||
{ // somehow some table miss the 0x00 - 0x20 part
|
||||
*dest = (PRUnichar) *src;
|
||||
} else if(nsIUnicodeDecoder::kOnError_Signal == aBehavior)
|
||||
{
|
||||
*aSrcLength -= srclen;
|
||||
*aDestLength = validlen;
|
||||
@ -153,7 +156,10 @@ NS_IMETHODIMP nsUnicodeDecodeUtil::Convert(
|
||||
}
|
||||
}
|
||||
if(i == numberOfTable) {
|
||||
if(nsIUnicodeDecoder::kOnError_Signal == aBehavior)
|
||||
if((*src < 0x20) || (0x7F == *src))
|
||||
{ // somehow some table miss the 0x00 - 0x20 part
|
||||
*dest = (PRUnichar) *src;
|
||||
} else if(nsIUnicodeDecoder::kOnError_Signal == aBehavior)
|
||||
{
|
||||
*aSrcLength -= srclen;
|
||||
*aDestLength = validlen;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user