Commit 5db8911d authored by 赵小蒙's avatar 赵小蒙

add errors="replace" in write mode MODE_TXT

parent 29d2be62
......@@ -39,7 +39,7 @@ class DiskReaderWriter(AbsReaderWriter):
if not os.path.exists(directory_path):
os.makedirs(directory_path)
if mode == MODE_TXT:
with open(abspath, "w", encoding=self.encoding) as f:
with open(abspath, "w", encoding=self.encoding, errors="replace") as f:
f.write(content)
elif mode == MODE_BIN:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment