[PyQt] Error when using Chinese characters in PyQt Designer

Christoph Burgmer chrislb at gmx.de
Mon Jul 27 10:20:15 BST 2009


Am Freitag, 24. Juli 2009 schrieb ZelluX:
> Hi, all
>
> In PyQt Designer 4.5.2 I set the property 'text' of a QPushButton to some
> Chinese characters, and when I run pyuic4 to generate the coresponding .py
> file, it reports error, here is traceback:

_snip_

> It seems pyuic4 cannot handle Chinese characters correctly. Is there anyway
> to deal with unicode? Many thanks.

Can you attach an example of your .ui file?
It's "just" an encoding error and can probably be fixed if there is no code 
that explicitly asks for a str (and wouldn't accept unicode).
-Christoph


More information about the PyQt mailing list