- 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:42 +00:00
Родитель f88f0cbaa3
Коммит f1a2c8bb9e
1 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

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