зеркало из https://github.com/mozilla/pjs.git
261249 treat UTF-8 strings as UTF-8, not latin1. r=bzbarsky sr=darin
This commit is contained in:
Родитель
296bc854c5
Коммит
795c362196
|
@ -441,7 +441,7 @@ LRESULT CMozillaBrowser::OnCreate(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL&
|
||||||
ios->GetProtocolHandler(kDesignModeScheme, getter_AddRefs(ph));
|
ios->GetProtocolHandler(kDesignModeScheme, getter_AddRefs(ph));
|
||||||
if (ph &&
|
if (ph &&
|
||||||
NS_SUCCEEDED(ph->GetScheme(phScheme)) &&
|
NS_SUCCEEDED(ph->GetScheme(phScheme)) &&
|
||||||
phScheme.EqualsIgnoreCase(kDesignModeScheme))
|
phScheme.LowerCaseEqualsASCII(kDesignModeScheme))
|
||||||
{
|
{
|
||||||
Navigate(const_cast<BSTR>(kDesignModeURL), NULL, NULL, NULL, NULL);
|
Navigate(const_cast<BSTR>(kDesignModeURL), NULL, NULL, NULL, NULL);
|
||||||
}
|
}
|
||||||
|
|
|
@ -107,7 +107,8 @@ LRESULT CPPageDlg::OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL&
|
||||||
|
|
||||||
nsCOMPtr<nsIMIMEInfo> mimeInfo;
|
nsCOMPtr<nsIMIMEInfo> mimeInfo;
|
||||||
nsCAutoString contentType;
|
nsCAutoString contentType;
|
||||||
contentType.AssignWithConversion(mType);
|
// MIME Types are ASCII.
|
||||||
|
LossyCopyUTF16toASCII(mType, contentType);
|
||||||
mimeService->GetFromTypeAndExtension(contentType, EmptyCString(), getter_AddRefs(mimeInfo));
|
mimeService->GetFromTypeAndExtension(contentType, EmptyCString(), getter_AddRefs(mimeInfo));
|
||||||
if (mimeInfo)
|
if (mimeInfo)
|
||||||
{
|
{
|
||||||
|
|
|
@ -329,7 +329,8 @@ nsScriptablePeer::ConvertVariants(nsIVariant *aIn, VARIANT *aOut)
|
||||||
{
|
{
|
||||||
nsCAutoString value;
|
nsCAutoString value;
|
||||||
aIn->GetAsAUTF8String(value);
|
aIn->GetAsAUTF8String(value);
|
||||||
nsAutoString valueWide; valueWide.AssignWithConversion(value.get());
|
nsAutoString valueWide;
|
||||||
|
CopyUTF8toUTF16(value, valueWide);
|
||||||
aOut->vt = VT_BSTR;
|
aOut->vt = VT_BSTR;
|
||||||
aOut->bstrVal = SysAllocString(valueWide.get());
|
aOut->bstrVal = SysAllocString(valueWide.get());
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче