[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: [PyKDE] unicode two-way conversion
From:       "Giovanni Bajo" <rasky () develer ! com>
Date:       2005-10-25 12:43:23
Message-ID: 025201c5d961$afa5a210$bf03030a () trilan
[Download RAW message or body]

Diez B. Roggisch <deets@web.de> wrote:

> Then you need to _decode_ it as utf-8 to yield a unicode object. So the
> whole line should read
>
> self.user.data["achternaam"] =
> self.GAchternaam.text().utf8().decode('utf-8')


You're working way too hard to get an unicode string out of a QString:

self.user.data["achternaam"] = unicode(self.GAchternaam.text())

But Sebastian wanted a UTF-8 string, so calling .utf8() on the QString
should be sufficient.
-- 
Giovanni Bajo

_______________________________________________
PyKDE mailing list    PyKDE@mats.imk.fraunhofer.de
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic