Sebastian Kügler <[EMAIL PROTECTED]> wrote: > File "john.py", line 154, in dataFromGuiToUser > self.user.data["achternaam"] = self.GAchternaam.text().encode('utf-8', > 'strict') > AttributeError: encode > > So the problem is that I'm not able to convert the QString to utf-8 (without > making it a str first, which bails out on UnicodeDecodeError. See attached > snippet. > > Any idea?
Quickly skimming through QString docs reveals a utf8() method. Otherwise, you can call unicode() just as you would call str(), and then using unicode.encode. -- Giovanni Bajo _______________________________________________ PyKDE mailing list PyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo/pykde