Fix for 209699 (bug convert some consumers over to CopyUTF8toUTF16 / CopyUTF16toUTF8). r=jshin, sr=jst.

git-svn-id: svn://10.0.0.236/trunk@162447 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
peterv%propagandism.org
2004-09-16 12:39:49 +00:00
parent b4df4cb3a1
commit 01e29b99dc
16 changed files with 57 additions and 65 deletions

View File

@@ -1012,7 +1012,7 @@ nsresult nsWebBrowserPersist::SendErrorStatusChange(
{
nsCAutoString fileurl;
aURI->GetSpec(fileurl);
path = NS_ConvertUTF8toUCS2(fileurl);
AppendUTF8toUTF16(fileurl, path);
}
nsAutoString msgId;
@@ -1115,7 +1115,7 @@ nsresult nsWebBrowserPersist::AppendPathToURI(nsIURI *aURI, const nsAString & aP
}
// Store the path back on the URI
newPath += NS_ConvertUCS2toUTF8(aPath);
AppendUTF16toUTF8(aPath, newPath);
aURI->SetPath(newPath);
return NS_OK;
@@ -3187,14 +3187,14 @@ nsWebBrowserPersist::FixupURI(nsAString &aURI)
rawPathURL.Append(filename);
nsCAutoString buf;
newValue = NS_ConvertUTF8toUCS2(
NS_EscapeURL(rawPathURL, esc_FilePath, buf));
AppendUTF8toUTF16(NS_EscapeURL(rawPathURL, esc_FilePath, buf),
newValue);
}
else
{
nsCAutoString fileurl;
fileAsURI->GetSpec(fileurl);
newValue.Assign(NS_ConvertUTF8toUCS2(fileurl));
AppendUTF8toUTF16(fileurl, newValue);
}
if (data->mIsSubFrame)
{

View File

@@ -502,7 +502,7 @@ nsWindowWatcher::OpenWindowJS(nsIDOMWindow *aParent,
nameSpecified = PR_FALSE;
if (aName) {
name.Assign(NS_ConvertUTF8toUCS2(aName));
CopyUTF8toUTF16(aName, name);
CheckWindowName(name);
nameSpecified = PR_TRUE;
}