From 410fa0a5d328cb3978deff76736f2904d113ab43 Mon Sep 17 00:00:00 2001 From: Looki2000 Date: Sat, 16 Mar 2024 22:14:53 +0100 Subject: [PATCH] updated project saving --- project.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/project.py b/project.py index ea1bc73..cc47824 100644 --- a/project.py +++ b/project.py @@ -19,7 +19,7 @@ class Project: def load(self,path): - with open(path, "r") as f: + with open(path, "r", encoding="utf-8") as f: project_data = json.load(f) if not "char_width" in project_data or not "char_height" in project_data: raise AttributeError("Character metrics information not found") @@ -37,12 +37,12 @@ class Project: def save(self,path): # save project data to file - with open(path, "w") as f: + with open(path, "w", encoding="utf-8") as f: json.dump({ "char_width": self.char_res[0], "char_height": self.char_res[1], "chars": self.chars - }, f, indent=4) + }, f, indent=4, ensure_ascii=False) self.path=path self.loaded=True