From a05f54a10efdaa8b78d95a22ede09662744d2b1e Mon Sep 17 00:00:00 2001 From: Yuri Verweij Date: Tue, 7 Apr 2026 17:08:01 +0200 Subject: [PATCH] Specify UTF-8 encoding for translation file opening Add UTF-8 encoding when opening translation files. --- src/robotlibcore/utils/translations.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/robotlibcore/utils/translations.py b/src/robotlibcore/utils/translations.py index 35c32f6..ed026f0 100644 --- a/src/robotlibcore/utils/translations.py +++ b/src/robotlibcore/utils/translations.py @@ -22,7 +22,7 @@ def _translation(translation: Optional[Path] = None): if translation and isinstance(translation, Path) and translation.is_file(): - with translation.open("r") as file: + with translation.open("r", encoding="utf-8") as file: try: return json.load(file) except json.decoder.JSONDecodeError: