[Bug 301291] Forward-inline ignores outgoing-charset preference

r=bienvenu, sr=mscott, p=Petr Hroudny <petr.hroudny@gmail.com>


git-svn-id: svn://10.0.0.236/trunk@237271 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
mkmelin+mozilla%iki.fi
2007-10-04 18:13:01 +00:00
parent f5098435ae
commit 74f9ae8cc1

View File

@@ -1673,7 +1673,29 @@ nsresult nsMsgCompose::CreateMessage(const char * originalMsgURI,
// If we are forwarding inline, mime did already setup the compose fields therefore we should stop now
if (type == nsIMsgCompType::ForwardInline )
{
// use send_default_charset if reply_in_default_charset is on.
nsCOMPtr<nsIPrefBranch> prefs (do_GetService(NS_PREFSERVICE_CONTRACTID));
if (prefs)
{
PRBool replyInDefault = PR_FALSE;
prefs->GetBoolPref("mailnews.reply_in_default_charset",
&replyInDefault);
if (replyInDefault)
{
nsString str;
nsCString charset;
NS_GetLocalizedUnicharPreferenceWithDefault(prefs, "mailnews.send_default_charset",
EmptyString(), str);
if (!str.IsEmpty())
{
LossyCopyUTF16toASCII(str, charset);
m_compFields->SetCharacterSet(charset.get());
}
}
}
return rv;
}
char *uriList = PL_strdup(originalMsgURI);
if (!uriList)