fix write_to_file func for utf8 chars
This commit is contained in:
parent
8884652c8f
commit
763b8f4e9d
@ -12,7 +12,11 @@ def write_to_file(content, file_path: Path, json_dumps=False, indent=None):
|
||||
file_path.parent.mkdir(parents=True, exist_ok=True)
|
||||
with open(file_path, mode="w") as f:
|
||||
if json_dumps:
|
||||
return f.write(json.dumps(content, indent=indent, default=serialize_sets))
|
||||
return f.write(
|
||||
json.dumps(
|
||||
content, indent=indent, ensure_ascii=False, default=serialize_sets
|
||||
)
|
||||
)
|
||||
return f.write(content)
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user