[PyQt] issues with pyqt webview and unicode characters.
webmedic at gmail.com
Fri Oct 15 19:44:12 BST 2010
I'm working on an epub reader were zipfile is used to read the files within
In the past I would just use the load method to load the files into the
webview. With the zipfile though I'm actually using a read to read the file
in and then using sethtml on the webframe to display it.
This all works well accept that now I'm having an issue were when I use load
then unicode, curly quotes, etc. characters are displayed correctly but when
using sethtml they do not. I'm not sure if this is because using sethtml is
not setting the encoding for the page correctly or if I would be using
something to change the unicode to html entities. I would prefer though if
it is possible to not have to use html entities.
Has anybody else seen this and know of a possible workarround? Or possibly a
correct way to handle this? Auto detecting the encoding would be preferable
if that is possible.
Since it is an epub it would also be possible to grab the lang setting from
the included xml files for the epub itself. As long as these are
set correctly that may work.
Also forgive my ignorance on this if it is a simple question as I am just
starting to work with python and qt.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the PyQt