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 lemburg
Recipients eryksun, lemburg, methane, vstinner
Date 2021-03-19.12:11:37
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
In-reply-to <>
On 19.03.2021 12:35, Eryk Sun wrote:
> Eryk Sun <> added the comment:
>> Read the ANSI code page on Windows,
> I don't see why the Windows implementation is inconsistent with POSIX here. If it were changed to be consistent, the default encoding at startup would remain the same, since setlocale(LC_CTYPE, "") uses the process code page from GetACP().

I'm not sure I understand what you're saying (but then, I have little
experience with locales on Windows).

My assumption is that nl_langinfo(CODESET) does not work on Windows
or gives wrong results. Is that incorrect ?

If it does work, getencoding() could just be a shim over
nl_langinfo(CODESET) on all platforms.
Date User Action Args
2021-03-19 12:11:37lemburgsetrecipients: + lemburg, vstinner, methane, eryksun
2021-03-19 12:11:37lemburglinkissue43552 messages
2021-03-19 12:11:37lemburgcreate