Commit a95b0fc3 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Fix Bug 416758 - Encoding broken

BUG: 416758
BUG: 418161
FIXED-IN: 5.14.0
parent 32c76b46
......@@ -73,8 +73,8 @@ void WebEnginePartHtmlWriter::end()
mTempFile->open();
QTextStream stream(mTempFile);
//TODO we need to change codec when mail use different codec.
//stream.setCodec(codec().constData());
stream.setCodec("UTF-8");
stream.setCodec(codec().constData());
//stream.setCodec("UTF-8");
stream << data();
//Bug 387061
......
......@@ -896,7 +896,7 @@ void ViewerPrivate::parseContent(KMime::Content *content)
//TODO: needs to end up in renderer: mMessage.data() != content /* show only single node */);
otp.setAllowAsync(!mPrinting);
otp.parseObjectTree(content, mMessage.data() != content /* parse/show only single node */);
htmlWriter()->setCodec(otp.plainTextContentCharset());
if (message) {
htmlWriter()->write(writeMessageHeader(message, hasVCard ? vCardContent : nullptr, true));
}
......@@ -1337,6 +1337,7 @@ void ViewerPrivate::setMessagePart(KMime::Content *node)
parseContent(node);
htmlWriter()->write(cssHelper()->endBodyHtml());
htmlWriter()->end();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment