解决输出乱码

This commit is contained in:
Jing Ling
2020-07-08 10:23:14 +08:00
parent b9e3ba334a
commit 584323677d
3 changed files with 5 additions and 6 deletions
+1 -2
View File
@@ -226,8 +226,7 @@ def save_data(path, data):
:return: 保存成功与否
"""
try:
with open(path, 'w', encoding="utf-8",
errors='ignore', newline='') as file:
with open(path, 'w', errors='ignore', newline='') as file:
file.write(data)
return True
except TypeError: