activating charset override. bug #7886, r=ftang, a=bobj

git-svn-id: svn://10.0.0.236/trunk@62105 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
cata%netscape.com 2000-03-03 02:20:53 +00:00
parent 7c438bb6ab
commit 1d485f061e
3 changed files with 7 additions and 0 deletions

View File

@ -631,6 +631,9 @@ nsHTMLDocument::StartDocumentLoad(const char* aCommand,
PRUnichar* forceCharsetFromWebShell = NULL;
if (muCV) {
rv = muCV->GetForceCharacterSet(&forceCharsetFromWebShell);
if ((NULL != forceCharsetFromWebShell) && (0 != forceCharsetFromWebShell[0])) {
muCV->SetForceCharacterSet(NULL);
}
}
if(NS_SUCCEEDED(rv) && (nsnull != forceCharsetFromWebShell))
{

View File

@ -631,6 +631,9 @@ nsHTMLDocument::StartDocumentLoad(const char* aCommand,
PRUnichar* forceCharsetFromWebShell = NULL;
if (muCV) {
rv = muCV->GetForceCharacterSet(&forceCharsetFromWebShell);
if ((NULL != forceCharsetFromWebShell) && (0 != forceCharsetFromWebShell[0])) {
muCV->SetForceCharacterSet(NULL);
}
}
if(NS_SUCCEEDED(rv) && (nsnull != forceCharsetFromWebShell))
{

View File

@ -271,6 +271,7 @@ nsBrowserAppCore::SetDocumentCharset(const PRUnichar *aCharset)
nsCOMPtr<nsIMarkupDocumentViewer> markupCV = do_QueryInterface(childCV);
if (markupCV) {
NS_ENSURE_SUCCESS(markupCV->SetDefaultCharacterSet(aCharset), NS_ERROR_FAILURE);
NS_ENSURE_SUCCESS(markupCV->SetForceCharacterSet(aCharset), NS_ERROR_FAILURE);
}
}
}