Commits

Jason R. Coombs committed 09df7e1

Use sys.getfilesystemencoding for decoding bdist_wininst config. Fixes #114.

Comments (0)

Files changed (2)

 CHANGES
 =======
 
+-----
+1.4.1
+-----
+
+* Issue #114: Use ``sys.getfilesystemencoding`` for decoding config in
+  ``bdist_wininst`` distributions.
+
 ---
 1.4
 ---

setuptools/command/easy_install.py

             else:
                 null_byte = chr(0)
             config = part.split(null_byte, 1)[0]
-            # Now the config is in bytes, but on Python 3, it must be
-            #  unicode for the RawConfigParser, so decode it. Is this the
-            #  right encoding?
-            config = config.decode('ascii')
+            # Now the config is in bytes, but for RawConfigParser, it should
+            #  be text, so decode it.
+            config = config.decode(sys.getfilesystemencoding())
             cfg.readfp(StringIO(config))
         except ConfigParser.Error:
             return None