Skip to content

Commit a05f54a

Browse files
authored
Specify UTF-8 encoding for translation file opening
Add UTF-8 encoding when opening translation files.
1 parent d7296f2 commit a05f54a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/robotlibcore/utils/translations.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
def _translation(translation: Optional[Path] = None):
2424
if translation and isinstance(translation, Path) and translation.is_file():
25-
with translation.open("r") as file:
25+
with translation.open("r", encoding="utf-8") as file:
2626
try:
2727
return json.load(file)
2828
except json.decoder.JSONDecodeError:

0 commit comments

Comments
 (0)