Force opening CN chars file as utf-8 on Windows

This commit is contained in:
Kilrah
2020-02-24 15:10:41 +01:00
parent 5a051547df
commit 8adcd73c18
+1 -1
View File
@@ -13,7 +13,7 @@ extra_chars = "".join([chr(0x10000+i) for i in range(21)])
def chinese_chars():
charset = set()
tools_path = os.path.dirname(os.path.realpath(__file__))
with open(os.path.join(tools_path, "../radio/src/translations/cn.h.txt")) as f:
with open(os.path.join(tools_path, "../radio/src/translations/cn.h.txt"), encoding='utf-8') as f:
data = f.read()
for c in data:
if 0x4E00 <= ord(c) <= 0x9FFF: