From 54d080bf6a4f52da287e984f305243c10db097f5 Mon Sep 17 00:00:00 2001 From: kannkyo <15080890+kannkyo@users.noreply.github.com> Date: Sat, 20 Jun 2026 00:07:20 +0900 Subject: [PATCH] Specify UTF-8 encoding for file reads (#1007) Added UTF-8 encoding to file reads for YAML and JSON files. --- py/libs/wildcards.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/py/libs/wildcards.py b/py/libs/wildcards.py index 384f2f8..243a4a2 100644 --- a/py/libs/wildcards.py +++ b/py/libs/wildcards.py @@ -47,7 +47,7 @@ def read_wildcard_dict(wildcard_path): easy_wildcard_dict[key] = lines elif file.endswith('.yaml'): file_path = os.path.join(root, file) - with open(file_path, 'r') as f: + with open(file_path, 'r', encoding="utf-8") as f: yaml_data = yaml.load(f, Loader=yaml.FullLoader) for k, v in yaml_data.items(): @@ -55,7 +55,7 @@ def read_wildcard_dict(wildcard_path): elif file.endswith('.json'): file_path = os.path.join(root, file) try: - with open(file_path, 'r') as f: + with open(file_path, 'r', encoding="utf-8") as f: json_data = json.load(f) for key, value in json_data.items(): key = wildcard_normalize(key)