From 931bf7da16dd440d08d9a95372f477a1f807d7dd Mon Sep 17 00:00:00 2001 From: Fabian Dill Date: Fri, 1 Apr 2022 07:14:20 +0200 Subject: [PATCH] SMZ3: fix loading TextScript on systems that don't default to something utf-8 compatible (#384) --- worlds/smz3/TotalSMZ3/Text/Texts.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/worlds/smz3/TotalSMZ3/Text/Texts.py b/worlds/smz3/TotalSMZ3/Text/Texts.py index df60d19c..247ff92b 100644 --- a/worlds/smz3/TotalSMZ3/Text/Texts.py +++ b/worlds/smz3/TotalSMZ3/Text/Texts.py @@ -17,7 +17,7 @@ class Texts: @staticmethod def ParseTextScript(resource: str): - with open(resource, 'r') as file: + with open(resource, 'r', encoding="utf-8-sig") as file: return [text.rstrip('\n') for text in file.read().replace("\r", "").split("---\n") if text] scripts: Any = ParseYamlScripts.__func__(text_folder + "/Scripts/General.yaml")