[issue19058] test_sys.test_ioencoding_nonascii() fails with ASCII locale encoding

Serhiy Storchaka report at bugs.python.org
Sat Sep 28 23:02:10 CEST 2013


Serhiy Storchaka added the comment:

> Your test is skipped if the locale encoding is ASCII, whereas the purpopse of PYTHONIOENCODING is to write non-ASCII characters without having to care of the locale encoding.

This case was tested in previous test.

> If you really want to check the codec itself, you should use known sequence, ex: 'héllo€'.encode('cp1252') gives b'h\xe9llo\x80'.

We can't be sure that OS supports cp1252 (or any other non-default) locale.

----------

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


More information about the Python-bugs-list mailing list