mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 14:22:01 +00:00
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:
parent
572285560e
commit
b22d243c41
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user