Closed boldtrn closed 8 years ago
As we handle this in UTF only maybe the OCD or OSM encoding is not UTF or iso something. Do you have examples? And OCD or nominatim?
I have not debugged this in great detail, but when I request the following from Nominatim:
http://nominatim.openstreetmap.org/search.php?q=Kirchheimerstra%C3%9Fe%20Wernau&format=json
then the result contains:
display_name: "Kirchheimer Straße, Wernau (Neckar), Landkreis Esslingen, Regierungsbezirk Stuttgart, Baden-Württemberg, 73249, Deutschland"
When I query the geocoder converter:
http://localhost:8080/nominatim?q=Kirchheimerstra%C3%9Fe%20Wernau
then the results contain
name: "Kirchheimer Straße, Wernau (Neckar), Landkreis Esslingen, Regierungsbezirk Stuttgart, Baden-Württemberg, 73249, Deutschland
Strange, Firefox says this is already UTF8 but jersey also always uses UTF8: http://stackoverflow.com/q/9359728/194609
Maybe we need to add UTF8 here in the requests explicitly (ConverterResourceNominatim/ConverterResourceOpenCageData)?
accept("application/json").
-> accept("application/json;charset=utf-8").
This is fixed in https://github.com/boldtrn/graphhopper-geocoder-converter/commit/a2f45fe0d9e6666359a05da43f9f2f4f8708df98
The issue was in the resource, we had to add the charset to the @Produces
annotation. @Produces("application/json; charset=utf-8")
Interesting, as in the referenced stackoverflow link they say json has utf8 by default ... anyway: thanks :) !
It seems that we have an issue with the encoding.
Characters like: ä,ü,ö,ß are returned as cryptic symbols, e.g. Baden-Württemberg.