the tostring and XML methods in ElementTree
Serge Orlov
Serge.Orlov at gmail.com
Sun May 7 18:43:05 EDT 2006
mirandacascade at yahoo.com wrote:
> O/S: Windows XP Home
> Vsn of Python: 2.4
[snip fighting with unicode character U+2019 (RIGHT SINGLE QUOTATION
MARK) ]
I don't know what console you use but if it is IDLE you'll get confused
even more because it is buggy and improperly handles that character:
>>> print repr(u'I'm confused')
u'I\x92m confused'
I'm using Lightning Compiler
<http://cheeseshop.python.org/pypi/Lightning%20Compiler> to run
snippets of code and in the editor tab it handles that character fine:
>>> print repr(u'I'm confused')
u'I\u2019m confused'
But in the console tab it produces the same buggy result :) It looks
like handling unicode is like rocket science :)
More information about the Python-list
mailing list