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 Paul Monson, eryksun, methane, paul.moore, serhiy.storchaka, steve.dower, tim.golden, vstinner, zach.ware
Date 2019-05-10.01:23:50
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
About the ANSI code page, Lib/encodings/ calls _winapi.GetACP() to avoid relying on locale.getpreferredencoding() which lies when UTF-8 Mode is enabled:

            import _winapi
            ansi_code_page = "cp%s" % _winapi.GetACP()
            if encoding == ansi_code_page:
                import encodings.mbcs
                return encodings.mbcs.getregentry()

> So I don't think it is lie.  It is just "what encoding name we should choose when GetACP() returned 65001.".
> With your PR 13230, cp65001 is truly utf-8.  So returning "utf-8" seems right behavior.

Well, feel free to propose a PR. I have no strong opinion on this level of detail :-)
Date User Action Args
2019-05-10 01:23:50vstinnersetrecipients: + vstinner, paul.moore, tim.golden, methane, zach.ware, serhiy.storchaka, eryksun, steve.dower, Paul Monson
2019-05-10 01:23:50vstinnersetmessageid: <>
2019-05-10 01:23:50vstinnerlinkissue36778 messages
2019-05-10 01:23:50vstinnercreate