In ConvertToUnicode() call IsAscii before doing the optimization for ASCII, bug 116264, r=ducarroz, sr=sspitzer.

This commit is contained in:
nhotta%netscape.com 2002-01-09 20:53:11 +00:00
parent d7f4435f8c
commit f06c04cc45

View File

@ -310,9 +310,10 @@ nsresult ConvertToUnicode(const char* aCharset,
outString.Truncate();
return NS_OK;
}
else if (!*aCharset ||
!nsCRT::strcasecmp("us-ascii", aCharset) ||
!nsCRT::strcasecmp("ISO-8859-1", aCharset)) {
else if ((!*aCharset ||
!nsCRT::strcasecmp("us-ascii", aCharset) ||
!nsCRT::strcasecmp("ISO-8859-1", aCharset)) &&
nsCRT::IsAscii(inCString)) {
outString.AssignWithConversion(inCString);
return NS_OK;
}