on master help sign in
Merge pull request #1124 from JosephKiranBabu/python3-unicode-support

Make Python 3 able to read settings files with Unicode characters

commit8511e64f350b4b31db314a5d74ef77dd5b97b5f3 authorAdam Tauber <asciimoo@gmail.com> dateFri 12 Jan 2018, 10:58 (9 years ago) parentbb47ea2bdc803e
3 files changed+3−3
searx/__init__.py+1−1 searx/engines/__init__.py+1−1 searx/engines/currency_convert.py+1−1
searx/__init__.py+1−1
@@ -50,7 +50,7 @@ if not settings_path:
5050 raise Exception('settings.yml not found')
5151
5252# load settings
53−with open(settings_path) as settings_yaml:
53+with open(settings_path, 'rb') as settings_yaml:
5454 settings = load(settings_yaml)
5555
5656'''
searx/engines/__init__.py+1−1
@@ -36,7 +36,7 @@ engines = {}
3636
3737categories = {'general': []}
3838
39−languages = loads(open(engine_dir + '/../data/engines_languages.json').read())
39+languages = loads(open(engine_dir + '/../data/engines_languages.json', 'rb').read())
4040
4141engine_shortcuts = {}
4242engine_default_args = {'paging': False,
searx/engines/currency_convert.py+1−1
@@ -94,7 +94,7 @@ def load():
9494 global db
9595
9696 current_dir = os.path.dirname(os.path.realpath(__file__))
97− json_data = open(current_dir + "/../data/currencies.json").read()
97+ json_data = open(current_dir + "/../data/currencies.json", 'rb').read()
9898
9999 db = json.loads(json_data)
100100