-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
5.6.0 Beta
-
None
When using setContent() to set the content of a QWebEngineView umlauts are not displayed correctly, i.e. the content is interpreted as iso8859-1 or event plain text:
The problems occur with the following html document:
<html>
<head><meta http-equiv="Content-type" content="text/html; charset=utf-8"></head>
<body>Umlauts are here: äöü.</body>
</html>
The html is passed to setContent as utf8 bytearray:
webView->setContent(htmlAsUtf7, mimeType);
Depending on the content of the mimetype parameter, different results are observed:
1. mimeType is "text/html": The content is displayed as HTML, umlauts are interpreted in iso8859-1
2. mimeType is "text/html; charset=utf-8": The content display as HTML, umlauts are displayed correctly
3. mimeType is passed empty: No auto detected seems to occur, the document is displayed as plain text.
I consider
1) a bug since the HTML contains a charset directive
2) not sure whether the mimetype parameter should overwrite the html content charset information
3) a bug since it should at least assume "text/html" and not text/plain