fix for bug 206379:

- combine nsICharsetConverterManager2 and nsICharsetConverterManager
- get rid of nsIAtom in most of the methods
- provide versions of getUnicodeDecoder/Encoder which don't do alias resolution
- change all charset types to ASCII strings
- clean up some other i18n APIs which could be simplified
- fix all consumers of all changed i18n interfaces
r=jshin, smontagu
rs=sfraser
This commit is contained in:
alecf%flett.org 2005-11-02 07:40:44 +00:00
parent bd2cecba8e
commit 2c5896b747

View File

@ -272,7 +272,7 @@ txStylesheetSink::OnDataAvailable(nsIRequest *aRequest, nsISupports *aContext,
NS_IMETHODIMP
txStylesheetSink::OnStartRequest(nsIRequest *aRequest, nsISupports *aContext)
{
nsAutoString charset(NS_LITERAL_STRING("UTF-8"));
nsCAutoString charset(NS_LITERAL_CSTRING("UTF-8"));
PRInt32 charsetSource = kCharsetFromDocTypeDefault;
nsCOMPtr<nsIChannel> channel = do_QueryInterface(aRequest);
@ -285,8 +285,8 @@ txStylesheetSink::OnStartRequest(nsIRequest *aRequest, nsISupports *aContext)
do_GetService(NS_CHARSETALIAS_CONTRACTID);
if (calias) {
nsAutoString preferred;
rv = calias->GetPreferred(NS_ConvertASCIItoUCS2(charsetVal),
nsCAutoString preferred;
rv = calias->GetPreferred(charsetVal,
preferred);
if (NS_SUCCEEDED(rv)) {
charset = preferred;
@ -296,7 +296,7 @@ txStylesheetSink::OnStartRequest(nsIRequest *aRequest, nsISupports *aContext)
}
nsCOMPtr<nsIParser> parser = do_QueryInterface(aContext);
parser->SetDocumentCharset(charset, charsetSource);
parser->SetDocumentCharset(NS_ConvertASCIItoUCS2(charset), charsetSource);
nsCAutoString contentType;
channel->GetContentType(contentType);