зеркало из https://github.com/mozilla/pjs.git
Fix to bug 77967. Needed conversion from UTF8 to UCS2 instead from ASCII while reading the pref. Patch by bnesse. r=naoki sr=sspitzer.
This commit is contained in:
Родитель
521f6ccd5f
Коммит
55a1c4c2d0
|
@ -281,7 +281,7 @@ NS_IMETHODIMP nsPrefBranch::GetComplexValue(const char *aPrefName, const nsIID &
|
|||
} else {
|
||||
rv = GetCharPref(aPrefName, getter_Copies(utf8String));
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
rv = theString->SetData(NS_ConvertASCIItoUCS2(utf8String).get());
|
||||
rv = theString->SetData(NS_ConvertUTF8toUCS2(utf8String).get());
|
||||
}
|
||||
}
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
|
@ -321,7 +321,7 @@ NS_IMETHODIMP nsPrefBranch::GetComplexValue(const char *aPrefName, const nsIID &
|
|||
nsCOMPtr<nsISupportsWString> theString(do_CreateInstance(NS_SUPPORTS_WSTRING_CONTRACTID, &rv));
|
||||
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
rv = theString->SetData(NS_ConvertASCIItoUCS2(utf8String).get());
|
||||
rv = theString->SetData(NS_ConvertUTF8toUCS2(utf8String).get());
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
nsISupportsWString *temp = theString;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче