mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
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:
@@ -228,7 +228,7 @@ class QWaitingForMissionResultWindow(QDialog):
|
||||
)
|
||||
print(file)
|
||||
try:
|
||||
with open(file[0], "r") as json_file:
|
||||
with open(file[0], "r", encoding="utf-8") as json_file:
|
||||
json_data = json.load(json_file)
|
||||
json_data["mission_ended"] = True
|
||||
debriefing = Debriefing(json_data, self.game, self.unit_map)
|
||||
|
||||
@@ -43,7 +43,7 @@ class Campaign:
|
||||
|
||||
@classmethod
|
||||
def from_file(cls, path: Path) -> Campaign:
|
||||
with path.open() as campaign_file:
|
||||
with path.open(encoding="utf-8") as campaign_file:
|
||||
if path.suffix == ".yaml":
|
||||
data = yaml.safe_load(campaign_file)
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user