[fix] read utf-8 files (settings, languages, currency) with python3.5

Related to discussion in #1124
The io.open import is necessary for python2
This commit is contained in:
Marc Abonce Seguin 2018-01-16 23:05:18 -06:00
parent 5947c05649
commit 829032f306
3 changed files with 6 additions and 3 deletions

View file

@ -4,6 +4,7 @@ import os
import sys
import unicodedata
from io import open
from datetime import datetime
if sys.version_info[0] == 3:
@ -94,7 +95,7 @@ def load():
global db
current_dir = os.path.dirname(os.path.realpath(__file__))
json_data = open(current_dir + "/../data/currencies.json", 'rb').read()
json_data = open(current_dir + "/../data/currencies.json", 'r', encoding='utf-8').read()
db = json.loads(json_data)