From b04bd8618ca956c2ceab36a8729cab822f0cff93 Mon Sep 17 00:00:00 2001 From: cobaltchang Date: Tue, 5 Jul 2016 22:36:52 +0800 Subject: [PATCH] Fix the error without specified encoding when compiling (#4246) Fix setup.py error on some platforms --- setup.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 0fef70f1f..86870489f 100755 --- a/setup.py +++ b/setup.py @@ -4,6 +4,7 @@ import os import re import shutil import sys +from io import open from setuptools import setup @@ -16,7 +17,7 @@ except ImportError: print("warning: pypandoc module not found, could not convert Markdown to RST") def read_md(f): - return open(f, 'r').read() + return open(f, 'r', encoding='utf-8').read() def get_version(package):