pypa/pip — pull request #1331 by sscherfke (2013-11-21 10:17:26+00:00)
Title: Avoid UnicodeDecodeErrors when reading egg_info files. Fix issue #1291.

Try utf-8, the system’s default encoding, and latin1 when reading egg_info-files to avoid UnicodeDecodeErrors at the installation of a package. Fix issue #1291.

Previously, these files were read with the systems preffered encoding (e.g., cp1252 on Windows). That would raise a UnicodeDecodeError if a package’s long-description was encoded in utf-8 (not so unprobable with utf-8 being the default encoding in Python 3).

I coudn’t run the complete test suite, but tests/unit/test_req.py passed on Py2.7 and Py3.3 on OS X, Linux and Windows.