--- a/src/internfile/mh_mail.cpp
+++ b/src/internfile/mh_mail.cpp
@@ -259,13 +259,13 @@
// Special case for text/plain content. Internfile should deal
// with this but it expects text/plain to be utf-8 already, so we
// handle the transcoding if needed
- if (m_metaData[cstr_mimetype] == cstr_textplain &&
- stringicmp(m_metaData[cstr_charset], "UTF-8")) {
+ if (m_metaData[cstr_mimetype] == cstr_textplain) {
string utf8;
if (!transcode(body, utf8, m_metaData[cstr_charset], "UTF-8")) {
LOGERR((" processAttach: transcode to utf-8 failed "
"for charset [%s]\n", m_metaData[cstr_charset].c_str()));
- // Just let it through and hope for the best...
+ // can't transcode at all -> data is garbage just erase it
+ body.clear();
} else {
body = utf8;
}