diff --git a/searx/version.py b/searx/version.py index 34c37bd22..daada6020 100644 --- a/searx/version.py +++ b/searx/version.py @@ -126,8 +126,8 @@ GIT_URL = "{GIT_URL}" GIT_BRANCH = "{GIT_BRANCH}" """ with open( - os.path.join(os.path.dirname(__file__), "version_frozen.py"), "w" - ) as f: + os.path.join(os.path.dirname(__file__), "version_frozen.py"), + "w", encoding="utf8") as f: f.write(python_code) print(f"{f.name} created") else: diff --git a/searx_extra/update/update_external_bangs.py b/searx_extra/update/update_external_bangs.py index c366fe76b..e6331d47c 100755 --- a/searx_extra/update/update_external_bangs.py +++ b/searx_extra/update/update_external_bangs.py @@ -154,5 +154,5 @@ if __name__ == '__main__': 'version': bangs_version, 'trie': parse_ddg_bangs(fetch_ddg_bangs(bangs_url)) } - with open(get_bangs_filename(), 'w') as fp: + with open(get_bangs_filename(), 'w', encoding="utf8") as fp: json.dump(output, fp, ensure_ascii=False, indent=4) diff --git a/searx_extra/update/update_osm_keys_tags.py b/searx_extra/update/update_osm_keys_tags.py index f803d0c33..a71f2d9a1 100755 --- a/searx_extra/update/update_osm_keys_tags.py +++ b/searx_extra/update/update_osm_keys_tags.py @@ -205,5 +205,5 @@ if __name__ == '__main__': 'keys': optimize_keys(get_keys()), 'tags': optimize_tags(get_tags()), } - with open(get_osm_tags_filename(), 'w') as f: + with open(get_osm_tags_filename(), 'w', encoding="utf8") as f: json.dump(result, f, indent=4, ensure_ascii=False)