diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2015-12-01 11:53:50 -0500 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2015-12-01 11:53:50 -0500 |
commit | 23ed0dbdc3795a62120844fa6fe503d4dc7a3b6d (patch) | |
tree | b9f9f7e51c99dcae301a7dedb96a8e873392b357 /pkg_resources | |
parent | 7327246d36657190892c4b5e0db41990c90c53c5 (diff) | |
download | python-setuptools-bitbucket-23ed0dbdc3795a62120844fa6fe503d4dc7a3b6d.tar.gz |
Read metadata as utf-8; Fixes failure when LC_ALL=C
Diffstat (limited to 'pkg_resources')
-rw-r--r-- | pkg_resources/__init__.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index c53215c6..3cd67fa0 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -2021,7 +2021,7 @@ class FileMetadata(EmptyProvider): def get_metadata(self, name): if name=='PKG-INFO': - with open(self.path,'rU') as f: + with io.open(self.path, 'rU', encoding='utf-8') as f: metadata = f.read() return metadata raise KeyError("No metadata except PKG-INFO is available") |