From 3b1294133d2ebbc47d3658262e4ee887e71bb08e Mon Sep 17 00:00:00 2001 From: raphael60650 Date: Wed, 16 Jun 2021 10:51:23 +0200 Subject: [PATCH] added support for utf8 to avoid problem with JAP and KOR bmg files --- source/patch_bmg.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/patch_bmg.py b/source/patch_bmg.py index 3a70a6d..e229243 100644 --- a/source/patch_bmg.py +++ b/source/patch_bmg.py @@ -102,7 +102,7 @@ def patch_bmg(self, gamefile): # gamefile est le fichier .szs trouvé dans le / trackend = "2328" bmgtracks = bmgtracks[bmgtracks.find(trackheader) + len(trackheader):bmgtracks.find(trackend)] - with open("./file/ExtraCommon.txt", "w") as f: + with open("./file/ExtraCommon.txt", "w", encoding="utf8") as f: f.write("#BMG\n\n" f" 703e\t= {self.translate('Aléatoire: Toutes les pistes', lang=bmglang)}\n" f" 703f\t= {self.translate('Aléatoire: Pistes Originales', lang=bmglang)}\n"