Unsolved Qt5, Windows 10: german Umlauten not correctly displayed
-
Porting from Qt 4.8 to 5.7 has raised a new issue: Umlauten inside a QString containing HTML code are not displayed correctly in a QLabel.
Following a code fragment;mText = QString("<html><head>\ <style type=\"text/css\">\ .on{font: %1px Lucida Console; color: #FFFFFF;}\ .off{font: %1px Lucida Console; color: #707070;}\ .on2{font: %2 %1px Lucida Console; color: #FFFFFF;}\ .off2{font: %2 %1px Lucida Console; color: #707070;}\ </style>\ </head>\ <body>").arg(mLetterSize).arg(mLetterSize < 14 ? "" : "bold"); mText += QString("<DIV style= \"line-height: %1px;\">").arg(mLineHeight); // E S K I S T A F Ü N F mText += "<SPAN class=\"on\">E S </SPAN>"; mText += "<SPAN class=\"off\">K </SPAN>"; mText += "<SPAN class=\"on\">I S T </SPAN>"; mText += "<SPAN class=\"off\">A </SPAN>"; mText += show_fuenf ? "<SPAN class=\"on\">F Ü N F</SPAN>" : "<SPAN class=\"off\">F Ü N F</SPAN>"; mText += "<br>";
Any idea how to solve the issue?
Thank you for your valuable time.
Alain