From 34ed6a3a2a0a6bfc607bfb3455b6693830771915 Mon Sep 17 00:00:00 2001 From: Thijs van den Berg <43202049+Denbergvanthijs@users.noreply.github.com> Date: Thu, 1 Apr 2021 16:50:00 +0200 Subject: [PATCH] Change encoding. Fix for #676 (#722) First read the file in binary mode. Then, convert to utf-8. Fix for https://github.com/tzutalin/labelImg/issues/676 --- setup.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/setup.py b/setup.py index a765bf6a..39f7eb5e 100644 --- a/setup.py +++ b/setup.py @@ -16,12 +16,11 @@ about = {} with open(os.path.join(here, 'libs', '__init__.py')) as f: exec(f.read(), about) -with open('README.rst') as readme_file: - readme = readme_file.read() - -with open('HISTORY.rst') as history_file: - history = history_file.read() +with open("README.rst", "rb") as readme_file: + readme = readme_file.read().decode("UTF-8") +with open("HISTORY.rst", "rb") as history_file: + history = history_file.read().decode("UTF-8") # OS specific settings SET_REQUIRES = []