Skip to content

Commit

Permalink
ensure utf8 encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
3ll3d00d committed Oct 6, 2023
1 parent ac23c91 commit 8cb9cb2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/main/python/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -1146,7 +1146,7 @@ def export_beq_filter(self):
from model.merge import DspType
parser = HDXmlParser(DspType.MINIDSP_TWO_BY_FOUR_HD, False)
output_xml, _ = parser.convert(file_path, self.__filter_model.filter)
with open(file_name, 'w+') as f:
with open(file_name, 'w+', encoding='utf8') as f:
f.write(output_xml)

def __open_merge_signal_dialog(self):
Expand Down
4 changes: 2 additions & 2 deletions src/main/python/model/merge.py
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ def __write_to(self, dst: Path, entry: CatalogueEntry):
dst = shutil.copy2(self.__config_file, dst.resolve())
output_config, was_optimised = self.__parser.convert(str(dst),
entry.iir_filters(self.__dsp_type.target_fs))
with dst.open('w', newline=self.__parser.newline()) as dst_file:
with dst.open('w', newline=self.__parser.newline(), encoding='utf8') as dst_file:
dst_file.write(output_config)
if was_optimised is False:
self.__signals.on_success.emit()
Expand All @@ -573,7 +573,7 @@ def __process_file(self, base_parts_idx, xml):
dst = shutil.copy2(self.__config_file, dst.resolve())
filt = xml_to_filt(str(xml), fs=self.__dsp_type.target_fs)
output_config, was_optimised = self.__parser.convert(str(dst), filt)
with dst.open('w', newline=self.__parser.newline()) as dst_file:
with dst.open('w', newline=self.__parser.newline(), encoding='utf8') as dst_file:
dst_file.write(output_config)
if was_optimised is False:
self.__signals.on_success.emit()
Expand Down

0 comments on commit 8cb9cb2

Please sign in to comment.