Open all files with utf-8 encoding

- will not be used for binary read/writes (rb,wb)!
- prevents a bug where units with special characters in the unit name can not be tracked anymore as there will be a name mismatch due to wrong encoding
This commit is contained in:
RndName
2021-08-12 23:32:09 +02:00
parent c80d0e5378
commit b5b0d82a1a
9 changed files with 10 additions and 8 deletions

View File

@@ -65,7 +65,7 @@ class Operation:
@classmethod
def prepare(cls, game: Game) -> None:
with open("resources/default_options.lua", "r") as f:
with open("resources/default_options.lua", "r", encoding="utf-8") as f:
options_dict = loads(f.read())["options"]
cls._set_mission(Mission(game.theater.terrain))
cls.game = game