This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients kulikjak, vstinner
Date 2019-06-25.00:55:12
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1561424112.45.0.87986776666.issue37335@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2019-06-25 00:55:12vstinnersetrecipients: + vstinner, kulikjak
2019-06-25 00:55:12vstinnersetmessageid: <1561424112.45.0.87986776666.issue37335@roundup.psfhosted.org>
2019-06-25 00:55:12vstinnerlinkissue37335 messages
2019-06-25 00:55:12vstinnercreate