summaryrefslogtreecommitdiffstats
path: root/Lib/locale.py
diff options
context:
space:
mode:
authorGordon Messmer <gordon.messmer@gmail.com>2023-04-26 06:33:09 (GMT)
committerGitHub <noreply@github.com>2023-04-26 06:33:09 (GMT)
commit2763994be38e388c321a6807264c694dbf1dafcb (patch)
treeed96608128263619db6c48c77873bc734dbd6a4e /Lib/locale.py
parent31acfd78a0810f84898d36a8289e407d3754b823 (diff)
downloadcpython-2763994be38e388c321a6807264c694dbf1dafcb.zip
cpython-2763994be38e388c321a6807264c694dbf1dafcb.tar.gz
cpython-2763994be38e388c321a6807264c694dbf1dafcb.tar.bz2
gh-74940: Allow fallback to UTF-8 encoding on systems with no locales installed (GH-14925)
This change removes the alias of the 'C' locale to 'en_US'. Because of this alias, it is currently impossible for an application to use setlocale() to specify a UTF-8 locale on a system that has no locales installed, but which supports the C.UTF-8 locale/encoding.
Diffstat (limited to 'Lib/locale.py')
-rw-r--r--Lib/locale.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/locale.py b/Lib/locale.py
index 4127d91..e94f0d1 100644
--- a/Lib/locale.py
+++ b/Lib/locale.py
@@ -962,7 +962,7 @@ locale_alias = {
'c.ascii': 'C',
'c.en': 'C',
'c.iso88591': 'en_US.ISO8859-1',
- 'c.utf8': 'en_US.UTF-8',
+ 'c.utf8': 'C.UTF-8',
'c_c': 'C',
'c_c.c': 'C',
'ca': 'ca_ES.ISO8859-1',