Bug 319037 - Provide default value for mailnews.localizedRe, patch to fix backend, r+sr=bienvenu
--- a/mailnews/base/util/nsMsgUtils.cpp
+++ b/mailnews/base/util/nsMsgUtils.cpp
@@ -554,20 +554,22 @@ PRBool NS_MsgStripRE(const char **string
const char *last;
PRUint32 L;
PRBool result = PR_FALSE;
NS_ASSERTION(stringP, "bad null param");
if (!stringP) return PR_FALSE;
// get localizedRe pref
nsresult rv;
- nsCString localizedRe;
- nsCOMPtr<nsIPrefBranch> prefBranch(do_GetService(NS_PREFSERVICE_CONTRACTID, &rv));
- if (NS_SUCCEEDED(rv))
- prefBranch->GetCharPref("mailnews.localizedRe", getter_Copies(localizedRe));
+ nsString utf16LocalizedRe;
+ NS_GetLocalizedUnicharPreferenceWithDefault(nsnull,
+ "mailnews.localizedRe",
+ EmptyString(),
+ utf16LocalizedRe);
+ NS_ConvertUTF16toUTF8 localizedRe(utf16LocalizedRe);
// hardcoded "Re" so that noone can configure Mozilla standards incompatible
nsCAutoString checkString("Re,RE,re,rE");
if (!localizedRe.IsEmpty()) {
checkString.Append(',');
checkString.Append(localizedRe);
}