From 663a36e2925b828057f10aae41eee7fd940fe930 Mon Sep 17 00:00:00 2001 From: laqieer Date: Tue, 15 Feb 2022 11:23:29 +0800 Subject: [PATCH] Add UTF-8 support to file_info module. --- tools/butano/file_info.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/butano/file_info.py b/tools/butano/file_info.py index 8d34468..1560c40 100644 --- a/tools/butano/file_info.py +++ b/tools/butano/file_info.py @@ -35,7 +35,7 @@ def read(file_path): read_failed = True if os.path.isfile(file_path): - with open(file_path, 'r') as file: + with open(file_path, 'r', encoding='utf-8') as file: info = file.read() read_failed = False @@ -56,7 +56,7 @@ def __init__(self, info, read_failed): self.__read_failed = read_failed def write(self, file_path): - with open(file_path, 'w') as file: + with open(file_path, 'w', encoding='utf-8') as file: file.write(self.__info) def __eq__(self, other):