зеркало из https://github.com/mozilla/pjs.git
[Bug 301291] Forward-inline ignores outgoing-charset preference
r=bienvenu, sr=mscott, p=Petr Hroudny <petr.hroudny@gmail.com>
This commit is contained in:
Родитель
2fbab3eaa4
Коммит
cabfdefb05
|
@ -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)
|
||||
|
|
Загрузка…
Ссылка в новой задаче