From 718715180dee0e76266417094df5de64dd274cec Mon Sep 17 00:00:00 2001 From: Dalf Date: Sat, 11 Jul 2020 12:23:08 +0200 Subject: [PATCH] [mod] external_bang.py: always read bangs.json with a UTF-8 file. --- searx/external_bang.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/searx/external_bang.py b/searx/external_bang.py index f8b9c44d3..0b4c4ae16 100644 --- a/searx/external_bang.py +++ b/searx/external_bang.py @@ -9,7 +9,7 @@ from searx import searx_dir # NOTE only use the get_bang_url bangs_data = {} -with open(join(searx_dir, 'data/bangs.json')) as json_file: +with open(join(searx_dir, 'data/bangs.json'), encoding='utf-8') as json_file: for bang in json.load(json_file)['bang']: for trigger in bang["triggers"]: bangs_data[trigger] = {x: y for x, y in bang.items() if x != "triggers"}