[issue37335] Add 646 ASCII alias to locale coercion tests.
STINNER Victor
report at bugs.python.org
Mon Jun 24 20:55:12 EDT 2019
STINNER Victor <vstinner at redhat.com> added the comment:
test_c_locale_coerce should use "codecs.lookup(encoding).name" to get the normalized name of an encoding, rather than fragile:
data = data.replace(b"ANSI_X3.4-1968", b"ascii")
data = data.replace(b"US-ASCII", b"ascii")
the proposed pattern is even more dangerous:
data = data.replace(b"646", b"ascii")
I'm not sure where encodings should be normalized. Maybe around _check_child_encoding_details().
For the PR, please write it for the master branch.
----------
nosy: +vstinner
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37335>
_______________________________________
More information about the Python-bugs-list
mailing list