Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7978695
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T09:33:24+00:00 2026-06-04T09:33:24+00:00

I have an HTML file which I want to load in a QWebView .

  • 0

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. &#x3041; 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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T09:33:26+00:00Added an answer on June 4, 2026 at 9:33 am

    Turns out I’ve been over-thinking this one, there is in fact a pretty simple solution:

    When confronted with Kanji characters which the current font is unable to display, Chrome is clever enough to fall back to a font which does support those characters (on my Win 7 PC the default Kanji font is MS Gothic).

    QtWebKit does not have this feature, and hence it is necessary to explicitly specify (in CSS) a Kanji-capable font for the areas which need it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have written xml file which contains html tags as element like <component> <input
I have an xml file which I imported in my html page like this:
I want to load a div which I have saved as plain text(file). I
I currently have a huge HTML file which doesn't have line breaks and just
can anyone help? I have a simple html file which i am filling via
I have a HTML file upload field from which I'm reading the file name
Let's say I'm including a file which contains html. The html have characters as
Afternoon, I am trying have an HTML file containing a frameset which contains two
I have a file which is combination of PHP and HTML. How can i
I have the following code which loads and html file into a webview -

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.