Closed jmizv closed 1 year ago
I'm using version 2.0 because 2.1 seems still to be missing in mvnrepository.
implementation 'de.westnordost:osmapi-overpass:2.0'
I have this code for executing a quite simple query.
OsmConnection connection = new OsmConnection("https://overpass-api.de/api/", "jmizv-DataHandler-v0.1"); OverpassMapDataApi overpass = new OverpassMapDataApi(connection); try { overpass.queryTable(""" [out:csv("name")][timeout:90]; area["name:de"="Magdeburg"]->.ar; way["highway"] [!"name:etymology:wikidata"] (area.ar); (._;>;); out meta; """, tea -> System.out.println(tea[0]), "\t"); } catch (Exception ex) { ex.printStackTrace(System.err); }
But I can see on the console this output:
[..] Walther-Rathenau-Stra�e L�neburger Stra�e Breiter Weg
I fail to see whether I need to set some encoding or whether this is a bug? Maybe solved in 2.1?
Executing this via https://overpass-turbo.eu/ gives the correct encoding.
What if you do not print it to console but write it into a file?
Oops, nevermind. Already while debugging I can see it is correct. Encoding is broken while printing to console. So, it's a problem on my side.
I'm using version 2.0 because 2.1 seems still to be missing in mvnrepository.
I have this code for executing a quite simple query.
But I can see on the console this output:
I fail to see whether I need to set some encoding or whether this is a bug? Maybe solved in 2.1?
Executing this via https://overpass-turbo.eu/ gives the correct encoding.