[issue19619] Blacklist base64, hex, ... codecs from bytes.decode() and str.encode()

STINNER Victor report at bugs.python.org
Sat Nov 23 02:03:19 CET 2013


STINNER Victor added the comment:

> Regarding UTF-8 et al, the existing shortcuts in unicodeobject.c already
> bypass the full codec machinery, and that includes the exception wrapping
> on failures.

There are still platforms using locale encodings different than ascii,
latin1 or utf8. For example, Windows never uses these encodings for
ANSI or OEM code page. ANSI code page is used as the Python filesystem
encoding which is used in a lot of places. OEM code page is used for
the stdio streams (stdin, stdout, stderr). There are some users using
locales with the latin9 encoding.

I proposed to remove the new code for exception handling to simplify
the code (because the error should not occur anymore).

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue19619>
_______________________________________


More information about the Python-bugs-list mailing list