From 7dba01b4f781e6cc69ed906802f47c7d4247124d Mon Sep 17 00:00:00 2001 From: Fabian Dill Date: Wed, 22 Jan 2020 18:00:58 +0100 Subject: [PATCH] mark utf-8 output as such --- Main.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Main.py b/Main.py index a814f5f5..9ff985f3 100644 --- a/Main.py +++ b/Main.py @@ -205,10 +205,13 @@ def main(args, seed=None): multidata = zlib.compress(json.dumps({"names": parsed_names, "roms": rom_names, - "remote_items": [player for player in range(1, world.players + 1) if world.remote_items[player]], - "locations": [((location.address, location.player), (location.item.code, location.item.player)) - for location in world.get_filled_locations() if type(location.address) is int] - }).encode("utf-8")) + "remote_items": [player for player in range(1, world.players + 1) if + world.remote_items[player]], + "locations": [((location.address, location.player), + (location.item.code, location.item.player)) + for location in world.get_filled_locations() if + type(location.address) is int] + }).encode("utf-8-sig")) if args.jsonout: jsonout["multidata"] = list(multidata) else: