Author: Armin Rigo <[email protected]>
Branch: 
Changeset: r55456:131735f133b5
Date: 2012-06-07 11:07 +0200
http://bitbucket.org/pypy/pypy/changeset/131735f133b5/

Log:    I *think* that this is already much better: if PYTHONIOENCODING is
        not set, then don't call set_io_encoding() at all on Windows.

diff --git a/pypy/translator/goal/app_main.py b/pypy/translator/goal/app_main.py
--- a/pypy/translator/goal/app_main.py
+++ b/pypy/translator/goal/app_main.py
@@ -513,8 +513,9 @@
             print >> sys.stderr, "'import site' failed"
 
     readenv = not ignore_environment
-    io_encoding = ((readenv and os.getenv("PYTHONIOENCODING"))
-                   or sys.getfilesystemencoding())
+    io_encoding = readenv and os.getenv("PYTHONIOENCODING")
+    if not io_encoding and not IS_WINDOWS:
+        io_encoding = sys.getfilesystemencoding()
     if io_encoding:
         set_io_encoding(io_encoding)
 
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to