From 7ebcebcd5bf7e25d044fb8e37314ecc0b05fd39f Mon Sep 17 00:00:00 2001 From: "mscott%netscape.com" Date: Wed, 19 Jul 2000 21:41:59 +0000 Subject: [PATCH] Bug #45816 --> fix i18n breakage of intl-accept pref by calling getLocalizedUnicharPref r=tao git-svn-id: svn://10.0.0.236/trunk@74479 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/mailnews/imap/src/nsImapProtocol.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/mozilla/mailnews/imap/src/nsImapProtocol.cpp b/mozilla/mailnews/imap/src/nsImapProtocol.cpp index 3feac44dfc6..70fb46f9f44 100644 --- a/mozilla/mailnews/imap/src/nsImapProtocol.cpp +++ b/mozilla/mailnews/imap/src/nsImapProtocol.cpp @@ -4225,15 +4225,16 @@ void nsImapProtocol::Language() // extract the desired language attribute from prefs nsresult rv = NS_OK; NS_WITH_SERVICE(nsIPref, prefs, kPrefCID, &rv); - nsXPIDLCString acceptLanguages; + nsXPIDLString acceptLanguages; if (NS_SUCCEEDED(rv) && prefs) - prefs->CopyCharPref("intl.accept_languages", getter_Copies(acceptLanguages)); + prefs->GetLocalizedUnicharPref("intl.accept_languages", getter_Copies(acceptLanguages)); // we need to parse out the first language out of this comma separated list.... // i.e if we have en,ja we only want to send en to the server. if (acceptLanguages) { - nsCAutoString extractedLanguage (acceptLanguages); + nsCAutoString extractedLanguage; + extractedLanguage.AssignWithConversion(acceptLanguages); PRInt32 pos = extractedLanguage.FindChar(',', PR_TRUE); if (pos > 0) // we have a comma separated list of languages... extractedLanguage.Truncate(pos); // truncate everything after the first comma (including the comma)