Skip to content

Commit

Permalink
Fix non latin symbols decoding in adapters (#1691)
Browse files Browse the repository at this point in the history
Signed-off-by: Konstantin <[email protected]>
  • Loading branch information
kalemas authored Mar 14, 2024
1 parent 4c17494 commit 383fcdd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/py-opentimelineio/opentimelineio/adapters/adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def read_from_file(
not self.has_feature("read_from_file") and
self.has_feature("read_from_string")
):
with open(filepath) as fo:
with open(filepath, encoding="utf-8") as fo:
contents = fo.read()
result = self._execute_function(
"read_from_string",
Expand Down Expand Up @@ -181,7 +181,7 @@ def write_to_file(
self.has_feature("write_to_string")
):
result = self.write_to_string(input_otio, **adapter_argument_map)
with open(filepath, 'w') as fo:
with open(filepath, 'w', encoding="utf-8") as fo:
fo.write(result)
result = filepath

Expand Down

0 comments on commit 383fcdd

Please sign in to comment.