Skip to content

Commit

Permalink
Add utf-8 encoding for extractors::python::_open
Browse files Browse the repository at this point in the history
  • Loading branch information
arkid15r committed Sep 11, 2024
1 parent 45dff71 commit 21d07d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lingva/extractors/python.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def parse_translationstring(arguments, filename, firstline):

def _open(filename):
"""Injection point for tests."""
return open(filename, "r")
return open(filename, "r", encoding="utf-8")


def safe_eval(s):
Expand Down

0 comments on commit 21d07d5

Please sign in to comment.