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/messagecomposer.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'kmail/messagecomposer.cpp') diff --git a/kmail/messagecomposer.cpp b/kmail/messagecomposer.cpp index 2a82da9e4..9b5763dd0 100644 --- a/kmail/messagecomposer.cpp +++ b/kmail/messagecomposer.cpp @@ -1251,7 +1251,9 @@ void MessageComposer::composeInlineOpenPGPMessage( KMMessage& theMessage, } mOldBodyPart.setContentDisposition( "inline" ); mOldBodyPart.setOriginalContentTypeStr( oldContentType.utf8() ); - mOldBodyPart.setCharset(mCharset); + if (mOldBodyPart.type() == DwMime::kTypeText) { + mOldBodyPart.setCharset(mCharset); + } addBodyAndAttachments( msg, splitInfo, false, false, mOldBodyPart, Kleo::InlineOpenPGPFormat ); mMessageList.push_back( msg ); if ( it == splitInfos.begin() ) { -- cgit v1.2.1