From 26c06d8c2a29d6e31f31362508dc5a4aa8d5efa2 Mon Sep 17 00:00:00 2001 From: Matthieu Gautier Date: Tue, 17 May 2022 18:36:35 +0200 Subject: [PATCH] Specify utf8 encoding when opening i18n resource file. Else, on windows, we will try to open files with "local" encoding (cp1252) --- scripts/kiwix-compile-i18n | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/kiwix-compile-i18n b/scripts/kiwix-compile-i18n index 4706f3aa1..90b01ed13 100755 --- a/scripts/kiwix-compile-i18n +++ b/scripts/kiwix-compile-i18n @@ -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):