[PyKDE] QString to Python string conversion trouble
Boudewijn Rempt
boud at valdyas.org
Thu Oct 25 22:32:12 BST 2001
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Thursday 25 October 2001 02:22, Andreas Gerstlauer wrote:
> phil at river-bank.demon.co.uk said:
> > If the __str__ implementation in QString was changed to just return the
> > Python Unicode object without converting it again to a string object -
> > would that work? Can you test this - I can't get near a system again
> > until Friday.
>
> Ok, I expaned a bit on my "Test" class example. See the enclosed script
> plus output generated by it. Seems to work fine.
>
I'm just now revising that chapter - and I would really like to have
both str(QString("\u4011\u4012")) and unicode(QString("\u4011\u4012"))
return the same Python Unicode object, that contains the right characters,
prefarably not an unicode-escape-encoded plain Python string.
Anyway, I have to finish this chapter by Friday or Saturday - so by then
I'll have to either write up the current trend of development, or the most
probably future implementation...
- --
Boudewijn Rempt | http://www.valdyas.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQE72HZdN8fj6DnPxOgRAp7+AJ0YpmLd4ur9KzaiOOUFE/VZqGixBQCffbge
ciSXcOQhzDeXnA67ji3PFKw=
=8aju
-----END PGP SIGNATURE-----
More information about the PyQt
mailing list