取消代码中utf8的编码转换
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user