I have an HTML file which I want to load in a QWebView
. The header looks something like:
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
</head>
The body text is mixed Latin and Japanese characters.
The page displays perfectly in Chrome, but all of the Japanese characters are replaced with □
when the page is displayed in a QWebView
.
QtWebKit seems to use the same system as used by QTextCodec
to handle conversions between unicode and other charsets (please correct me if I'm wrong on this) and I'm therefore working on the assumption that QtWebKit can support Shift_JIS
.
As a test, I've tried adding the specific unicode for a kanji character (e.g. ぁ
to display ぁ) to my HTML file. I get the character properly rendered in Chrome, but it also displays as □
in a QWebView
- I'm not sure whether this means I can trust the Shift_JIS to unicode conversion in Qt, but it certainly means I can't assume that it is the cause of the problem.
I'm not sure where to go from here; any suggestions as to solutions or other areas to investigate would be much appreciated.