help wanted regarding displaying Japanese characters in a GUI using QT and python

Serge Orlov Serge.Orlov at gmail.com
Thu Apr 20 05:57:00 EDT 2006


prats wrote:
> I think I could not make myself clear.

On the contrary. You've given enough information for me to do what you
want: decoding your text and displaying it in a GUI. The fact that I
used another GUI is not important, read below why.

> I have a GUI written in Python
> and Qt and PyQt as the python wrappper fro QT. Now I have a string
> which is base64 encoded. This string contains both japanese and english
> charaters. I need to decode them and display them properly in the GUI
> ie. with both english and japanese characters.

> I need a way to display them. Qt doc says that QStrings are capable of
> displaying all characters.

(nitpick: not displaying but holding) And so is capable Python unicode
string. It was introduced more than 5 years ago if my memory serves me
right. It is the recommeded way to hold non-ascii characters in Python
and all toolkits are expected to play nice with it. I would be really
surprised if PyQt doesn't work with it.

> So I need a way to get a QString from the
> base64 encoded string.

Why don't you try to use unicode?




More information about the Python-list mailing list