You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 20, 2021. It is now read-only.
I had a character encoding problem with the name obtained from the Geonames service. The only way I could overcome this is to replace line
values["nearbyplace"] = "%s [%s]" % (name, country)
in addPOIexec with
values["nearbyplace"] = "%s [%s]" % (name.encode("utf-8"), country.encode("utf-8"))
I would recommend to make this modification -- or something equivalent -- otherwise bug reporting at locations with f.i. "ő" in their name won't work. Other characters can be problematic too, but that was the one I met with.
The text was updated successfully, but these errors were encountered:
GeoNames is returning the place names in UTF-8 already. Why do they need to get encoded again?
It looks like the country is returned as ISO 3166-1 alpha-2 code. These two-letter codes range from U+0041 to U+005A (A-Z). It's not absolutely neccessary to encode them as UTF-8 here, because UTF-8 is backwards compatible to US-ASCII & ISO 8859-1 (latin1_* in MySQL) from U+0000 to U+007F.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I had a character encoding problem with the name obtained from the Geonames service. The only way I could overcome this is to replace line
values["nearbyplace"] = "%s [%s]" % (name, country)
in addPOIexec with
values["nearbyplace"] = "%s [%s]" % (name.encode("utf-8"), country.encode("utf-8"))
I would recommend to make this modification -- or something equivalent -- otherwise bug reporting at locations with f.i. "ő" in their name won't work. Other characters can be problematic too, but that was the one I met with.
The text was updated successfully, but these errors were encountered: