forked from Icycoide/searxng
[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:
parent
5947c05649
commit
829032f306
3 changed files with 6 additions and 3 deletions
|
@ -19,6 +19,7 @@ along with searx. If not, see < http://www.gnu.org/licenses/ >.
|
|||
import sys
|
||||
import threading
|
||||
from os.path import realpath, dirname
|
||||
from io import open
|
||||
from flask_babel import gettext
|
||||
from operator import itemgetter
|
||||
from json import loads
|
||||
|
@ -36,7 +37,7 @@ engines = {}
|
|||
|
||||
categories = {'general': []}
|
||||
|
||||
languages = loads(open(engine_dir + '/../data/engines_languages.json', 'rb').read())
|
||||
languages = loads(open(engine_dir + '/../data/engines_languages.json', 'r', encoding='utf-8').read())
|
||||
|
||||
engine_shortcuts = {}
|
||||
engine_default_args = {'paging': False,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue