[PyKDE] Using some ISO-8859-1 characters with PyQt
dan
dan at eevolved.com
Wed Dec 20 01:29:12 GMT 2000
On December 19, 2000 07:20 pm, you wrote:
> Thanks Dan!
>
> I got it working partly, by doing:
> mystring=eval(repr(QString("åäö")))
> atleast so that I could use some functions that seem to work with it.
> I still can't use "print" which still complains the same error message.
> I guess there has to be some other way of doing this.
>
did you try this?
qstr = QString("åäö") # unicode qstring
print `qstr` # note the backquotes
ustr = unicode(`qstr`, 'utf-8') # python unicode
print ustr # python knows how to print it's own unicode
print ustr.encode('ISO-8859-1') # swedish charset
More information about the PyQt
mailing list