Message346463
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. |
|
Date |
User |
Action |
Args |
2019-06-25 00:55:12 | vstinner | set | recipients:
+ vstinner, kulikjak |
2019-06-25 00:55:12 | vstinner | set | messageid: <1561424112.45.0.87986776666.issue37335@roundup.psfhosted.org> |
2019-06-25 00:55:12 | vstinner | link | issue37335 messages |
2019-06-25 00:55:12 | vstinner | create | |
|