# HG changeset patch # User Laman # Date 2021-12-16 21:37:59 # Node ID 882866aa38f6b4223c32c40322f51215c4790e6e # Parent b9be6aa9ece0a60fc81db61e15d7daf377ab57c3 adjusted all.hst encoding to iso8859 diff --git a/rank_progress.py b/rank_progress.py --- a/rank_progress.py +++ b/rank_progress.py @@ -151,7 +151,7 @@ if __name__ == "__main__": if args.file: print("Reading {} ...".format(args.file)) with ZipFile(args.file) as f: - s = f.read("all.hst").decode("utf-8") + s = f.read("all.hst").decode("iso8859") else: url = "https://europeangodatabase.eu/EGD/EGD_2_0/downloads/hisgor.zip" print("Downloading data from {} ...".format(url)) @@ -159,7 +159,7 @@ if __name__ == "__main__": with urllib.request.urlopen(url) as f: compressed_data = f.read() with ZipFile(io.BytesIO(compressed_data)) as g: - s = g.read("all.hst").decode("utf-8") + s = g.read("all.hst").decode("iso8859") except URLError as e: print( "* Failed to connect to the server. "