add cnf(maildefcharset) to set specific mail default charset (mainly for readpst extracts which are utf-8 but have no charset set)

This commit is contained in:
dockes 2009-11-27 13:23:13 +00:00
parent c05deda615
commit c78a3bb567

View File

@ -492,7 +492,7 @@ void MimeHandlerMail::walkmime(Binc::MimePart* doc, int depth)
// mailer used by yahoo support ('KANA') does this. We could convert
// to iso-8859 only if the transfer-encoding is 8 bit, or test for
// actual 8 bit chars, but what the heck, le'ts use 8859-1 as default
string charset = "iso-8859-1";
string charset;
it = content_type.params.find(string("charset"));
if (it != content_type.params.end())
charset = it->second;
@ -502,7 +502,9 @@ void MimeHandlerMail::walkmime(Binc::MimePart* doc, int depth)
!stringlowercmp("x-user-defined", charset) ||
!stringlowercmp("x-unknown", charset) ||
!stringlowercmp("unknown", charset) ) {
charset = "iso-8859-1";
RclConfig::getMainConfig()->getConfParam("maildefcharset", charset);
if (charset.empty())
charset = "iso-8859-1";
}
// Content transfer encoding