Specify utf8 encoding when opening i18n resource file.

Else, on windows, we will try to open files with "local" encoding (cp1252)
This commit is contained in:
Matthieu Gautier 2022-05-17 18:36:35 +02:00
parent eee6803328
commit 26c06d8c2a
1 changed files with 1 additions and 1 deletions

View File

@ -90,7 +90,7 @@ class Resource:
filename = filename.strip()
self.filename = filename
self.lang_code = lang_code(filename)
with open(filename, 'r') as f:
with open(filename, 'r', encoding='utf-8') as f:
self.data = f.read()
def get_string_table_name(self):