A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2010-June/100531.html below:

[Python-Dev] Reintroduce or drop completly hex, bz2, rot13, ... codecs

[Python-Dev] Reintroduce or drop completly hex, bz2, rot13, ... codecsVictor 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

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4