minad/osm

Wrong encoding for search results

pank opened this issue · 1 comments

pank commented

Hi,

osm.el seems to work really well! Many thanks!

On Windows[*], when I search for Copenhagen with s from an *osm buffer, the first result is København, Københavns .... It should be København, Københavns ....

I guess curl returns an UTF-8 JSON string from nominatim.openstreetmap.org in osm-search, but at least on my windows system Emacs thinks it is iso-8859-1. It can be fixed by running the returned string through (decode-coding-string (string-make-unibyte SEARCH-RESULT) 'utf-8)). This is probably not the correct way to handle this, though.

*: I don't think it is easy to change the system encoding to UTF-8 on windows, certainly not without admin rights...

minad commented

Please check if the encoding issue is fixed for you.