Skip to content

Commit 383fcdd

Browse files
authored
Fix non latin symbols decoding in adapters (#1691)
Signed-off-by: Konstantin <kostyamaslyuk@gmail.com>
1 parent 4c17494 commit 383fcdd

File tree

1 file changed

+2
-2
lines changed
  • src/py-opentimelineio/opentimelineio/adapters

1 file changed

+2
-2
lines changed

src/py-opentimelineio/opentimelineio/adapters/adapter.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ def read_from_file(
105105
not self.has_feature("read_from_file") and
106106
self.has_feature("read_from_string")
107107
):
108-
with open(filepath) as fo:
108+
with open(filepath, encoding="utf-8") as fo:
109109
contents = fo.read()
110110
result = self._execute_function(
111111
"read_from_string",
@@ -181,7 +181,7 @@ def write_to_file(
181181
self.has_feature("write_to_string")
182182
):
183183
result = self.write_to_string(input_otio, **adapter_argument_map)
184-
with open(filepath, 'w') as fo:
184+
with open(filepath, 'w', encoding="utf-8") as fo:
185185
fo.write(result)
186186
result = filepath
187187

0 commit comments

Comments
 (0)