Skip to content

Commit aff3ecd

Browse files
authored
Fix dumpers encoding on windows (#419)
Fix #418
1 parent e1a135d commit aff3ecd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

plugins/lib/fileconv/dumpers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ def write(self, data, params, *args, **kwargs):
265265
266266
Character encoding for str instances, default is UTF-8.
267267
"""
268-
with open(self.new_file_path, "w") as f:
268+
with open(self.new_file_path, "w", encoding="utf-8") as f:
269269
json.dump(data, f, **params)
270270

271271

@@ -376,7 +376,7 @@ def write(self, data, params, *args, **kwargs):
376376
Dumper (supposedly derived from yaml.BaseDumper)
377377
You should know what you are doing when passing this.
378378
"""
379-
with open(self.new_file_path, "w") as f:
379+
with open(self.new_file_path, "w", encoding="utf-8") as f:
380380
yaml.dump(data, f, **params)
381381

382382

0 commit comments

Comments
 (0)