Hi all, Any suggestions for the problem described below ?
Thanks Ashish -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Sharma, Ashish Sent: Thursday, November 17, 2011 7:11 PM To: [email protected] Subject: [webkit-qt] Unable to enforce charset for decoding an Html document Hi, I use qt web kit api to convert html files to pdf. The problem that I am facing is of character corruption of south east asian characters. Right now I am manually setting the character set for the html files in following way: QWebSettings objWebSettings = objQWebPage.settings(); objWebSettings.setDefaultTextEncoding("GB18030"); but the above code fails for html files of the following type: <html> <head> </head> <body class='hmmessage'><div dir='ltr'> <br><br><div><hr id="stopSpelling">From: [email protected]<br>To: [email protected]<br>Subject: <br>Date: Thu, 10 Nov 2011 14:53:17 +0800<br><br> <meta http-equiv="Content-Type" content="text/html; charset=unicode"> <meta name="Generator" content="Microsoft SafeHTML"> <style> .ExternalClass .ecxhmmessage P {padding:0px;} .ExternalClass body.ecxhmmessage {font-size:10pt;font-family:Tahoma;} </style> <div dir="ltr"> 逆势大;你是我的阿</div></div></div></body> </html> To me it looks like the webkit engine gives precedence to the 'meta' header that specifies the charset and ignores the encoding passed by me. Is there a way I can enforce my encoding on webkit engine? Thanks Ashish _______________________________________________ webkit-qt mailing list [email protected] http://lists.webkit.org/mailman/listinfo.cgi/webkit-qt _______________________________________________ webkit-qt mailing list [email protected] http://lists.webkit.org/mailman/listinfo.cgi/webkit-qt
