fix for bug 209220 - now that i18n APIs take ASCII charset names, update consumers to avoid excess conversions.. which usually means storing charset names as ASCII and updating a few other APIs
r=jkeiser, sr=jst and some great comments from jshin@mailaps.org git-svn-id: svn://10.0.0.236/trunk@143800 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -606,7 +606,7 @@ nsXMLDocument::StartDocumentLoad(const char* aCommand,
|
||||
aDocListener, aReset, aSink);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
nsAutoString charset(NS_LITERAL_STRING("UTF-8"));
|
||||
nsCAutoString charset(NS_LITERAL_CSTRING("UTF-8"));
|
||||
PRInt32 charsetSource = kCharsetFromDocTypeDefault;
|
||||
|
||||
nsCOMPtr<nsIURI> aUrl;
|
||||
@@ -621,9 +621,8 @@ nsXMLDocument::StartDocumentLoad(const char* aCommand,
|
||||
|
||||
if(NS_SUCCEEDED(rv) && (nsnull != calias) ) {
|
||||
nsCAutoString preferred;
|
||||
rv = calias->GetPreferred(charsetVal, preferred);
|
||||
rv = calias->GetPreferred(charsetVal, charset);
|
||||
if(NS_SUCCEEDED(rv)){
|
||||
CopyASCIItoUCS2(preferred, charset);
|
||||
charsetSource = kCharsetFromChannel;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user