1

According to Microsoft's documentation Windows has used IETF BCP locale names since Vista (in other words, they should be used on all currently-supported versions of Windows). These names typically look like "en-US" or "fr-FR".

When on Windows 10 I install Python 3.13.1 from python.org, I get the following when I start it in cmd.exe:

>>> import locale
>>> locale.setlocale(locale.LC_ALL, "")
'French_France.1252'

Putting aside for a moment the 8-bit codepage, where does French_France come from? I can't find this documented anywhere! And how can I convert it to a BCP-47 name?

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.