From bcdb5575372076546bab2046e421c32bd5ea018a Mon Sep 17 00:00:00 2001 From: Cuyler36 Date: Wed, 13 Nov 2024 13:53:14 -0500 Subject: [PATCH] Change msg_tool encoding to utf8 --- tools/msg_tool.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/msg_tool.py b/tools/msg_tool.py index 6404e9e9..6fa6d91f 100644 --- a/tools/msg_tool.py +++ b/tools/msg_tool.py @@ -566,7 +566,7 @@ def decode_file(data_path: str, table_path: str, out_path: str): output_buffer = [] with open(data_path, "rb") as df, open(table_path, "rb") as tf, open( - out_path, "w" + out_path, "w", encoding="utf-8" ) as of: while True: bytes = tf.read(4) @@ -664,7 +664,7 @@ def encode_file( current_entry = None recording = False - with open(file_path, "r") as tf, open(data_path, "wb") as df, open( + with open(file_path, "r", encoding="utf-8") as tf, open(data_path, "wb") as df, open( table_path, "wb" ) as tabf: for line in tf: