[PyKDE] Using some ISO-8859-1 characters with PyQt
dan
dan at eevolved.com
Wed Dec 20 00:44:22 GMT 2000
On December 19, 2000 04:21 pm, you wrote:
> I have some problems with using swedish character in Qt widgets when I'm
> using PyQt.
> Doing the following:
> mystring = str(QString("åäö"))
> Gives me the following error:
> UnicodeError: ASCII encoding error: ordinal not in range(128)
>
> However I have no problems doing QString("åäö") and no problems doing
> mystring="åäö"
> How would I go about to do the conversion in between?
try backquoting or using repr (i tried backquoting and it works) instead of
str()
on my keyboard the backquote is beside the number 1 at the top left of my kb.
your code with backquotes:
mystring = `QString("åäö")`
More information about the PyQt
mailing list