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.
Den 2000.12.20 00:35:13 +0100 skrev dan:
> 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("���")`
>
--
Ted Parnefors <[EMAIL PROTECTED]>, KeyID 0x6627DEE4
PGP Fingerprint 1C39FA94703EB54A011CF18932018E256627DEE4
_______________________________________________
PyKDE mailing list [EMAIL PROTECTED]
http://mats.gmd.de/mailman/listinfo/pykde