aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CHANGES.txt7
-rwxr-xr-xsetuptools/command/easy_install.py7
2 files changed, 10 insertions, 4 deletions
diff --git a/CHANGES.txt b/CHANGES.txt
index e23fa692..9190aee2 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -2,6 +2,13 @@
CHANGES
=======
+-----
+1.4.1
+-----
+
+* Issue #114: Use ``sys.getfilesystemencoding`` for decoding config in
+ ``bdist_wininst`` distributions.
+
---
1.4
---
diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py
index 6ce19fa4..d329f4cb 100755
--- a/setuptools/command/easy_install.py
+++ b/setuptools/command/easy_install.py
@@ -1373,10 +1373,9 @@ def extract_wininst_cfg(dist_filename):
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