diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2013-10-11 22:13:50 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2013-10-11 22:13:50 (GMT) |
commit | fd4722cacf4885c29d358b8de6718b51a8149fa3 (patch) | |
tree | b6868d551a73bdc223a1263483f61072e41eb932 /Lib/site.py | |
parent | 73abc527eb3e4b88f30b70e5404365ed24f545c9 (diff) | |
download | cpython-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.py | 4 |
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) |