Commit 6ca58f7d authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Make sure to using UTF-8 when codec is empty

parent d0d6502e
......@@ -73,7 +73,12 @@ void WebEnginePartHtmlWriter::end()
mTempFile->open();
QTextStream stream(mTempFile);
//TODO we need to change codec when mail use different codec.
stream.setCodec(codec().constData());
QByteArray codecValue = codec();
if (codecValue.isEmpty()) {
codecValue = QByteArray("UTF-8");
}
stream.setCodec(codecValue.constData());
//qDebug() << " codecValue ******************************************: " << codecValue;
//stream.setCodec("UTF-8");
stream << data();
......
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