Kurt Mueller wrote:
on a Linux system and python 2.5.1 I have the
following behaviour which I do not understand:
case 1
python -c 'a="ä"; print a ; print a.center(6,"-") ; b=unicode(a, "utf8"); print
b.center(6,"-")'
ä
--ä--
--ä---
To discover what is happening, try something like:
python -c 'for a in "ä", unicode("ä"): print len(a), a'
I suspect that in your encoding, "ä" is two bytes long, and in
unicode it is converted to to a single character.
--Scott David Daniels
scott.dani...@acm.org
--
http://mail.python.org/mailman/listinfo/python-list