[issue18818] Empty PYTHONIOENCODING is not the same as nonexistent
Serhiy Storchaka
report at bugs.python.org
Fri Aug 23 10:04:34 CEST 2013
Serhiy Storchaka added the comment:
Second variant of the patch also supports empty error handler as the default error handler (i.e. strict).
$ PYTHONIOENCODING=ascii: ./python
Python 3.4.0a1+ (default:5b5ef012cd4e+, Aug 23 2013, 10:18:51)
[GCC 4.6.3] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> print('\xbd')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
UnicodeEncodeError: 'ascii' codec can't encode character '\xbd' in position 0: ordinal not in range(128)
Without it different error is raised:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
LookupError: unknown error handler name ''
----------
Added file: http://bugs.python.org/file31435/empty_pythonioencoding_2.patch
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue18818>
_______________________________________
More information about the Python-bugs-list
mailing list