From 534f07225e25c814ffdc59def8bcbaac240ac59c Mon Sep 17 00:00:00 2001 From: sgmklp <2394501736@qq.com> Date: Sat, 15 Oct 2022 21:43:57 +0800 Subject: [PATCH] fix write wildcard files with Chinese name with wrong coding to wc.txt --- scripts/tag_autocomplete_helper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/tag_autocomplete_helper.py b/scripts/tag_autocomplete_helper.py index 9717db8..7f589d9 100644 --- a/scripts/tag_autocomplete_helper.py +++ b/scripts/tag_autocomplete_helper.py @@ -23,7 +23,7 @@ def get_embeddings(): def write_to_temp_file(name, data): """Writes the given data to a temporary file""" - with open(os.path.join(TEMP_PATH, name), 'w') as f: + with open(os.path.join(TEMP_PATH, name), 'w', encoding="utf-8") as f: f.write(('\n'.join(data)))