diff --git a/Lib/site.py b/Lib/site.py index 1c25f506ce7..a9f5480114e 100644 --- a/Lib/site.py +++ b/Lib/site.py @@ -175,7 +175,7 @@ def make_license(filename): # default is 'ascii', but if you're willing to experiment, you can # change this. -encoding = "ascii" # default +encoding = "ascii" # Default value set by _PyUnicode_Init() if 0: # Enable to support locale aware default string encodings. @@ -189,7 +189,8 @@ def make_license(filename): # Unicode to string conversion. encoding = "undefined" -sys.setdefaultencoding(encoding) +if encoding != "ascii": + sys.setdefaultencoding(encoding) # # Run custom site specific code, if available.