From 529e7ca2115de371a7cda9d040f9878876564598 Mon Sep 17 00:00:00 2001 From: Andreas Date: Sun, 19 Jan 2020 13:34:05 +0100 Subject: [PATCH] add reading always in utf8 (#66) --- osm/xml_handler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osm/xml_handler.py b/osm/xml_handler.py index be8ce25..f3403c2 100644 --- a/osm/xml_handler.py +++ b/osm/xml_handler.py @@ -15,7 +15,7 @@ class PercentageFile(object): def __init__(self, filename: str) -> None: self.size = os.stat(filename)[6] self.delivered = 0 - self.f = open(filename) + self.f = open(filename, encoding="utf-8") self.percentages = [1000] + [100 - 10 * x for x in range(0, 11)] def read(self, size: Optional[int] = None) -> str: