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

STINNER Victor report at bugs.python.org
Wed Oct 14 12:33:57 EDT 2015


STINNER Victor added the comment:

> What could you say about the recent patch Victor?

I'm not sure that it works in all cases. io.TextIOWrapper doesn't care to normalize the encoding name. You should use something like:

   encoding = codecs.lookup(encoding).name

Otherwise, the test can fail if you care one of the various aliases of each encoding. Example: "UTF-8" vs "utf8" vs "utf-8".

----------

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


More information about the Python-bugs-list mailing list