PyQT: QString to String Problem if ASCII>128

Ingo Linkweiler i.linkweiler at gmx.de
Fri Mar 8 06:58:00 EST 2002


Hi,

I get an error if i want to convert a QString with characters >ASCII 128
to a string:

>>> from qt import *
>>> s=QString("Hallo")
>>> s=QString("Hallo")
>>> print s
Hallo
>>> t=QString("Güllegülle")
>>> print t

Traceback (most recent call last):
  File "<stdin>", line 1, in ?
UnicodeError: ASCII encoding error: ordinal not in range(128)

Any Idea how to avoid this?

Ingo





More information about the Python-list mailing list