From 08fd383713d2599345959c2a213dd06df28afe27 Mon Sep 17 00:00:00 2001 From: siowu Date: Tue, 3 Sep 2024 02:43:04 +0800 Subject: [PATCH] Specify the encoding as UTF-8 when opening the MFC dictionary file in the Python script. --- client/pyscripts/fm11rf08s_recovery.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/pyscripts/fm11rf08s_recovery.py b/client/pyscripts/fm11rf08s_recovery.py index 493fd058f..08057c503 100755 --- a/client/pyscripts/fm11rf08s_recovery.py +++ b/client/pyscripts/fm11rf08s_recovery.py @@ -142,7 +142,7 @@ for sec in range(NUM_SECTORS): if os.path.isfile(DICT_DEF_PATH): print(f"Loading {DICT_DEF}") - with open(DICT_DEF_PATH, 'r') as file: + with open(DICT_DEF_PATH, 'r', encoding='utf-8') as file: for line in file: if line[0] != '#' and len(line) >= 12: DEFAULT_KEYS.add(line[:12])