What file you mean from your example?
OK start from beginning:
I create a file index.html with utf-8 encoding and also save file as utf-8:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
</head>
<body>
<h1>ľšÄťžýáÃ*</h1>
</body>
</html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
</head>
<body>
<h1>ľšÄťžýáÃ*</h1>
</body>
</html>
To copy to clipboard, switch view to plain text mode
The use this code to display content (web is filename):
in.setCodec("utf8");
view
->setHtml
(in.
readAll(),
QUrl("file:///home/www/"));
QTextStream in(&web);
in.setCodec("utf8");
view->setHtml(in.readAll(), QUrl("file:///home/www/"));
To copy to clipboard, switch view to plain text mode
but on display I can see only ýáÃ*.
Bookmarks