1. PyPA
  2. Python Packaging Authority Projects
  3. setuptools

Commits

Jason R. Coombs  committed 09df7e1

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

  • Participants
  • Parent commits 5d38ba9
  • Branches default

Comments (0)

Files changed (2)

File CHANGES.txt

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

File setuptools/command/easy_install.py

View file
  • Ignore whitespace
             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