From 3479159c7ff5c918af12e29a32367843f336b57f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Sun, 25 Mar 2018 20:20:07 +0200 Subject: kmail: Avoid setting charset on non-textual parts of emails MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Slávek Banko --- kmail/kmcommands.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'kmail/kmcommands.cpp') diff --git a/kmail/kmcommands.cpp b/kmail/kmcommands.cpp index 8b477924..a6185013 100644 --- a/kmail/kmcommands.cpp +++ b/kmail/kmcommands.cpp @@ -1350,13 +1350,10 @@ KMCommand::Result KMForwardAttachedCommand::execute() KMMessagePart *msgPart = new KMMessagePart; msgPart->setTypeStr("message"); msgPart->setSubtypeStr("rfc822"); - msgPart->setCharset(msg->charset()); msgPart->setName("forwarded message"); msgPart->setContentDescription(msg->from()+": "+msg->subject()); msgPart->setContentDisposition( "inline" ); - // THIS HAS TO BE AFTER setCte()!!!! msgPart->setMessageBody( KMail::Util::ByteArray( msg->asDwString() ) ); - msgPart->setCharset(""); fwdMsg->link(msg, KMMsgStatusForwarded); mWin->addAttach(msgPart); @@ -2893,7 +2890,9 @@ KMCommand::Result KMResendMessageCommand::execute() whiteList << "To" << "Cc" << "Bcc" << "Subject"; newMsg->sanitizeHeaders( whiteList ); - newMsg->setCharset(msg->codec()->mimeName()); + if( newMsg->type() == DwMime::kTypeText) { + newMsg->setCharset(msg->codec()->mimeName()); + } newMsg->setParent( 0 ); // make sure we have an identity set, default, if necessary -- cgit v1.2.3