From d02a7d90b98ae19bc1bf8c49ec1f5874d337ea77 Mon Sep 17 00:00:00 2001 From: Ben Busby Date: Tue, 21 Dec 2021 14:11:55 -0700 Subject: [PATCH] Use UTF-8 encoding when loading json files Fixes #581 --- app/__init__.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/app/__init__.py b/app/__init__.py index e4168c2..82c66fb 100644 --- a/app/__init__.py +++ b/app/__init__.py @@ -43,11 +43,14 @@ app.config['LANGUAGES'] = json.load(open( os.path.join(app.config['STATIC_FOLDER'], 'settings/languages.json'), encoding='utf-8')) app.config['COUNTRIES'] = json.load(open( - os.path.join(app.config['STATIC_FOLDER'], 'settings/countries.json'))) + os.path.join(app.config['STATIC_FOLDER'], 'settings/countries.json'), + encoding='utf-8')) app.config['TRANSLATIONS'] = json.load(open( - os.path.join(app.config['STATIC_FOLDER'], 'settings/translations.json'))) + os.path.join(app.config['STATIC_FOLDER'], 'settings/translations.json'), + encoding='utf-8')) app.config['THEMES'] = json.load(open( - os.path.join(app.config['STATIC_FOLDER'], 'settings/themes.json'))) + os.path.join(app.config['STATIC_FOLDER'], 'settings/themes.json'), + encoding='utf-8')) app.config['CONFIG_PATH'] = os.getenv( 'CONFIG_VOLUME', os.path.join(app.config['STATIC_FOLDER'], 'config'))