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