Commit e3ae1ba6 authored by Rick Gruber-Riemer's avatar Rick Gruber-Riemer

Fix default encoding on Windows not UTF8

parent bd957f8b
......@@ -702,7 +702,7 @@ if __name__ == "__main__":
handler = osmparser.OSMContentHandler(valid_node_keys=[], border=border)
buildings = Buildings()
buildings.register_callbacks_with(handler)
source = open(osm_fname)
source = open(osm_fname, encoding="utf8")
logging.info("Reading the OSM file might take some time ...")
handler.parse(source)
......
......@@ -165,7 +165,7 @@ def main():
req_way_keys = ["natural", "landuse"]
handler = osmparser.OSMContentHandlerOld(valid_node_keys, valid_way_keys, req_way_keys, valid_relation_keys,
req_relation_keys)
source = open(osm_fname)
source = open(osm_fname, encoding="utf8")
xml.sax.parse(source, handler)
trees = {}
......
......@@ -1469,7 +1469,7 @@ def main():
req_way_keys = ["building", "power", "aerialway", "railway", "landuse", "highway"]
handler = osmparser.OSMContentHandlerOld(valid_node_keys, valid_way_keys, req_way_keys, valid_relation_keys,
req_relation_keys)
source = open(osm_fname)
source = open(osm_fname, encoding="utf8")
xml.sax.parse(source, handler)
# References for buildings
building_refs = {}
......
......@@ -367,7 +367,7 @@ def main():
border = shg.Polygon(parameters.get_clipping_extent())
piers = Piers(transform, clusters, boundary_clipping_complete_way)
handler = osmparser.OSMContentHandler(valid_node_keys=[], border=border)
source = open(osm_fname)
source = open(osm_fname, encoding="utf8")
logging.info("Reading the OSM file might take some time ...")
handler.register_way_callback(piers.create_from_way, req_keys=piers.req_keys)
......
......@@ -259,7 +259,7 @@ def main():
border = shg.Polygon(parameters.get_clipping_extent())
platforms = Platforms(transform, clusters, boundary_clipping_complete_way)
handler = osmparser.OSMContentHandler(valid_node_keys=[], border=border)
source = open(osm_fname)
source = open(osm_fname, encoding="utf8")
logging.info("Reading the OSM file might take some time ...")
handler.register_way_callback(platforms.create_from_way, req_keys=platforms.req_keys)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment