From f9301c6c042546a86f28f2ddaccadca7bcf8b9a6 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 (cherry picked from commit 3479159c7ff5c918af12e29a32367843f336b57f) --- kmail/kmkernel.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'kmail/kmkernel.cpp') diff --git a/kmail/kmkernel.cpp b/kmail/kmkernel.cpp index fb22fca2e..f998a74c3 100644 --- a/kmail/kmkernel.cpp +++ b/kmail/kmkernel.cpp @@ -45,6 +45,7 @@ using TDERecentAddress::RecentAddresses; #include "kmsystemtray.h" #include "transportmanager.h" #include "importarchivedialog.h" +#include #include #include "kmailicalifaceimpl.h" @@ -574,7 +575,7 @@ int KMKernel::openComposer (const TQString &to, const TQString &cc, if( ! GlobalSettings::self()->exchangeCompatibleInvitations() ) { msgPart->setContentDisposition( attachContDisp ); } - if( !attachCharset.isEmpty() ) { + if( !attachCharset.isEmpty() && (msgPart->type() == DwMime::kTypeText) ) { // kdDebug(5006) << "KMKernel::openComposer set attachCharset to " // << attachCharset << endl; msgPart->setCharset( attachCharset ); -- cgit v1.2.1