SMZ3: fix loading TextScript on systems that don't default to something utf-8 compatible (#384)
This commit is contained in:
parent
fe4a26d034
commit
931bf7da16
|
@ -17,7 +17,7 @@ class Texts:
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def ParseTextScript(resource: str):
|
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]
|
return [text.rstrip('\n') for text in file.read().replace("\r", "").split("---\n") if text]
|
||||||
|
|
||||||
scripts: Any = ParseYamlScripts.__func__(text_folder + "/Scripts/General.yaml")
|
scripts: Any = ParseYamlScripts.__func__(text_folder + "/Scripts/General.yaml")
|
||||||
|
|
Loading…
Reference in New Issue