aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/package_index.py
diff options
context:
space:
mode:
Diffstat (limited to 'setuptools/package_index.py')
-rwxr-xr-xsetuptools/package_index.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/setuptools/package_index.py b/setuptools/package_index.py
index 48494aff..b6283dbc 100755
--- a/setuptools/package_index.py
+++ b/setuptools/package_index.py
@@ -197,6 +197,8 @@ class PackageIndex(Environment):
base = f.url # handle redirects
page = f.read()
+ charset = f.headers.get_param('charset') or 'latin-1'
+ page = page.decode(charset, "ignore")
f.close()
if url.startswith(self.index_url) and getattr(f,'code',None)!=404:
page = self.process_index(url, page)