summaryrefslogtreecommitdiffstats
path: root/Lib/site.py
diff options
context:
space:
mode:
authorSteve Dower <steve.dower@microsoft.com>2016-09-07 02:42:27 (GMT)
committerSteve Dower <steve.dower@microsoft.com>2016-09-07 02:42:27 (GMT)
commitf5aba58480bb0dd45181f609487ac2ecfcc98673 (patch)
tree0d70301224f945e379c37058fa6b24b6ba8c78e5 /Lib/site.py
parent22d0698d3b034f4f4314aa793da7225a5da640ba (diff)
downloadcpython-f5aba58480bb0dd45181f609487ac2ecfcc98673.zip
cpython-f5aba58480bb0dd45181f609487ac2ecfcc98673.tar.gz
cpython-f5aba58480bb0dd45181f609487ac2ecfcc98673.tar.bz2
Issue #27959: Adds oem encoding, alias ansi to mbcs, move aliasmbcs to codec lookup
Diffstat (limited to 'Lib/site.py')
-rw-r--r--Lib/site.py16
1 files changed, 0 insertions, 16 deletions
diff --git a/Lib/site.py b/Lib/site.py
index a84e3bb..a536ef1 100644
--- a/Lib/site.py
+++ b/Lib/site.py
@@ -423,21 +423,6 @@ def enablerlcompleter():
sys.__interactivehook__ = register_readline
-def aliasmbcs():
- """On Windows, some default encodings are not provided by Python,
- 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 _bootlocale, codecs
- enc = _bootlocale.getpreferredencoding(False)
- if enc.startswith('cp'): # "cp***" ?
- try:
- codecs.lookup(enc)
- except LookupError:
- import encodings
- encodings._cache[enc] = encodings._unknown
- encodings.aliases.aliases[enc] = 'mbcs'
-
CONFIG_LINE = r'^(?P<key>(\w|[-_])+)\s*=\s*(?P<value>.*)\s*$'
def venv(known_paths):
@@ -560,7 +545,6 @@ def main():
setcopyright()
sethelper()
enablerlcompleter()
- aliasmbcs()
execsitecustomize()
if ENABLE_USER_SITE:
execusercustomize()