[PyQt] Chinese characters

Jeremy Sanders jeremy at jeremysanders.net
Sat Dec 3 17:50:13 GMT 2011


Tore Knabe wrote:

> Hi,
> 
> I am having trouble with Chinese characters strings. Each character itself
> seems to be drawn okay, but the following character starts at the same
> position, on top of the previous one. Some Chinese characters don't seem
> to have that problem, but most have, especially the most common ones. Here
> is a short program that demonstrates the problem: the Label should show a
> string of three characters, but they are drawn on top of each other.

Works for me on Ubuntu 11.10 with Python 2.7. I had to change the encoding 
to utf-8 (not utf8 - I think this might be wrong). Also, if you're using 
Python 2.x, you need a "u" in front of your unicode string.

Jeremy

-- 
http://www.jeremysanders.net/



More information about the PyQt mailing list