取消代码中utf8的编码转换

This commit is contained in:
2025-07-05 19:05:35 +08:00
parent 12afd677b6
commit 8c12c1ffc3
8 changed files with 215 additions and 239 deletions

View File

@@ -25,10 +25,10 @@ def find_type(path:str,fix:str):
def conv(file:str):
s=""
try:
with open(file,encoding="gb2312") as f:
with open(file,encoding="utf-8") as f:
s=f.read()
os.remove(file)
with open(file,mode="w+",encoding="utf-8") as f:
with open(file,mode="w+",encoding="gbk") as f:
f.write(s)
except Exception as e:
print("conv failed",file)