SMZ3: fix loading TextScript on systems that don't default to something utf-8 compatible (#384)

This commit is contained in:
Fabian Dill 2022-04-01 07:14:20 +02:00 committed by GitHub
parent fe4a26d034
commit 931bf7da16
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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")