From 06b52b1efc7aa29aee57fb9fa62640c49ff06c41 Mon Sep 17 00:00:00 2001 From: hasslesstech Date: Sun, 24 Mar 2024 15:08:03 +0200 Subject: [PATCH] =?UTF-8?q?utils/table-generator/convert.py:=20=D0=B2?= =?UTF-8?q?=D0=BA=D0=B0=D0=B7=D0=B0=D0=B2=20=D0=BA=D0=BE=D0=B4=D1=83=D0=B2?= =?UTF-8?q?=D0=B0=D0=BD=D0=BD=D1=8F=20UTF-8=20=D0=B4=D0=BB=D1=8F=20=D1=80?= =?UTF-8?q?=D0=BE=D0=B1=D0=BE=D1=82=D0=B8=20=D0=B7=20=D1=84=D0=B0=D0=B9?= =?UTF-8?q?=D0=BB=D0=B0=D0=BC=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- utils/table-generator/convert.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/utils/table-generator/convert.py b/utils/table-generator/convert.py index ad46394..c74402f 100755 --- a/utils/table-generator/convert.py +++ b/utils/table-generator/convert.py @@ -96,7 +96,7 @@ if __name__=="__main__": if len(files) == 1: name = files[0] - data = open(name).read() + data = open(name, encoding = "utf-8").read() if usecase_formatting == YES: if verbose == YES: @@ -113,14 +113,14 @@ if __name__=="__main__": print(formatted_table_data) if write_to_file > AUTO: - open(name + ".table", 'w').write(data+"\n") + open(name + ".table", 'w', encoding = "utf-8").write(data+"\n") exit(0) for no, name in enumerate(sys.argv[1:]): print(f"Converting {no+1}/{len(sys.argv)}") - data = open(name).read() + data = open(name, encoding = "utf-8").read() if usecase_formatting == YES: if verbose >= AUTO: @@ -137,4 +137,4 @@ if __name__=="__main__": print(formatted_table_data) if write_to_file >= AUTO: - open(name + ".table", 'w').write(data+"\n") + open(name + ".table", 'w', encoding = "utf-8").write(data+"\n")