[Python-Dev] Reintroduce or drop completly hex, bz2, rot13, ... codecs
Victor Stinner
victor.stinner at haypocalc.com
Wed Jun 9 16:35:38 CEST 2010
Le mercredi 09 juin 2010 14:47:22, Nick Coghlan a écrit :
> *Some are obvious, such as rot13 being text only,
Should rot13 shift any unicode character, or just a-z and A-Z?
Python2 only changes characters a-z and A-Z, and use ISO-8859-1 to encode
unicode to byte string.
>>> u"abc é".encode("rot13")
'nop \xe9'
>>> u"abc \u2c01".encode("rot13")
Traceback (most recent call last):
...
UnicodeEncodeError: 'charmap' codec can't encode character u'\u2c01' in
position 4: character maps to <undefined>
--
Victor Stinner
http://www.haypocalc.com/
More information about the Python-Dev
mailing list