[Qt-interest] encoding problem of webkit

Li Li fancyerii at gmail.com
Sat Nov 20 07:21:30 CET 2010


hi everyone,
  when I use QWebView widget in java(jambi), I confronted the encoding problem.
  I think there is something wrong when java call c++ .It seems not
suitable to post
 a thread here. But in qt-jambi maillist, I don't get any solution.
    In many browsers such as firefox and Internet Explorer, they will
choose one by <meta http-equiv="content-type" content="text/html;
charset=UTF-8"> or some other criteron. And also they provide a menu
that user can choose charset themselves.
    Does Qt webkit module provide any API to change encoding/charset?
   I use my java browser to visit google, it's ok. When I search
something, it's ok.
  google's charset is utf8. in it's source file <meta
http-equiv="content-type" content="text/html; charset=UTF-8">
  When I visit baidu(http://www.baidu.com/), it's charset is
GBK/GB2312 for Chinese. It's ok now. But when I search something like
a word "good",the result page's charset is not
correct(http://www.baidu.com/s?wd=good)
  I tested with the demo browser in QT , it's ok. And I also tested
QWebView by a simple c++ program,
it's also ok. It seems there is something wrong when communicate c++
with jambi. I think when post http request, java version posts utf8
encoded query string.
  My jambi version is qt-jambi-4.7.0beta-win32
  Thank you.



More information about the Qt-interest-old mailing list