summaryrefslogtreecommitdiffstats
path: root/Lib/site.py
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2013-10-11 22:13:50 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2013-10-11 22:13:50 (GMT)
commitfd4722cacf4885c29d358b8de6718b51a8149fa3 (patch)
treeb6868d551a73bdc223a1263483f61072e41eb932 /Lib/site.py
parent73abc527eb3e4b88f30b70e5404365ed24f545c9 (diff)
downloadcpython-fd4722cacf4885c29d358b8de6718b51a8149fa3.zip
cpython-fd4722cacf4885c29d358b8de6718b51a8149fa3.tar.gz
cpython-fd4722cacf4885c29d358b8de6718b51a8149fa3.tar.bz2
Issue #9548: Add a minimal "_bootlocale" module that is imported by the _io module instead of the full locale module.
Diffstat (limited to 'Lib/site.py')
-rw-r--r--Lib/site.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/site.py b/Lib/site.py
index e1fa30e..4ac2860 100644
--- a/Lib/site.py
+++ b/Lib/site.py
@@ -426,8 +426,8 @@ def aliasmbcs():
while they are always available as "mbcs" in each locale. Make
them usable by aliasing to "mbcs" in such a case."""
if sys.platform == 'win32':
- import locale, codecs
- enc = locale.getdefaultlocale()[1]
+ import _bootlocale, codecs
+ enc = _bootlocale.getpreferredencoding(False)
if enc.startswith('cp'): # "cp***" ?
try:
codecs.lookup(enc)