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 eryksun
Recipients eryksun, vstinner
Date 2022-02-07.00:10:02
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1644192602.69.0.606277256868.issue46668@roundup.psfhosted.org>
In-reply-to
Content
> The Python 3.6 and 3.7 "codecs.register(_alias_mbcs)" doesn't work 
> because "search_function()" is tested before and it works for "cpXXX" 
> encodings.

Isn't the 3.6-3.10 ordering of search_function() and _alias_mbcs() correct as a fallback? In this case, Python doesn't support a cross-platform encoding for the code page. That's why the old implementation of test_mbcs_alias() mocked _winapi.GetACP() to return 123 and then checked that looking up 'cp123' returned the "mbcs" codec.

I'd actually prefer to extend this by implementing _winapi.GetOEMCP() and using "oem" as a fallback for that case.
History
Date User Action Args
2022-02-07 00:10:02eryksunsetrecipients: + eryksun, vstinner
2022-02-07 00:10:02eryksunsetmessageid: <1644192602.69.0.606277256868.issue46668@roundup.psfhosted.org>
2022-02-07 00:10:02eryksunlinkissue46668 messages
2022-02-07 00:10:02eryksuncreate