Skip to content

Commit 8d0a83c

Browse files
committed
windows下的乱码问题解决
1 parent 9baee4e commit 8d0a83c

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

python/setup.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,13 @@
55
from distutils import ccompiler
66
import os,sys
77
import shutil,os
8+
import platform
9+
810
if sys.version_info < (3, 0):
911
with open("README.md", "r") as fh:
1012
long_description = fh.read()
13+
if platform.system() == 'Windows':
14+
long_description = long_description.decode("utf8").encode("gbk")
1115
else:
1216
with open("README.md", "r", encoding='utf-8') as fh:
1317
long_description = fh.read()

0 commit comments

Comments
 (0)