From 9df9e2a7489be0840a10b735632580309205fc5b Mon Sep 17 00:00:00 2001 From: Tim Martin Date: Sun, 23 Nov 2014 15:08:42 +0000 Subject: [PATCH] Fixed failure to install on systems where locale is not UTF-8 In Python 3 open() defaults to reading in text mode in the default locale for the system. This causes an exception if the default locale encoding is ASCII, since the README.rst file is UTF-8 and not valid ASCII. The encoding can't be specified in the call to open() since this would not be valid Python 2. --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index c95a2f2..def421a 100644 --- a/setup.py +++ b/setup.py @@ -31,7 +31,7 @@ def read(fname): - return open(os.path.join(os.path.dirname(__file__), fname)).read() + return open(os.path.join(os.path.dirname(__file__), fname), 'rb').read().decode('utf-8') setup( name="microsofttranslator",