[OSM-dev] JOSM/OSM Charset problems

Raphaël Jacquot sxpert at esitcom.org
Mon Jun 19 11:32:12 BST 2006


Thomas Walraet wrote:
> Hi.
> 
> I investigated how charset are handled in OSM to find out why my street
> name are not properly displayed.
> 
> ** Server REST API (according to tests) :
> - Seems to accept request in UTF-8
> - No charset specified in response (not in XML first line, not in HTTP
> hearder)
> - Server responses _seems_ to be encoded in ISO-8859-1

the API is totally broken in this regard.
it should only do UTF-8....

> 
> ** JOSM (reading the code) :
> - XML send to the server specify "<?xml version='1.0'
> encoding='UTF-8'?>", but in fact JOSM encode the stream in the plateform
> default charset (ISO-8859-1 in my case)
> 
> 
> If I modify JOSM to send UTF-8 and read ISO-8859-1, everything works for
> me (but will not for characters outside of ISO-8859-1 I suppose). My
> patch (very simple) is attached below.




More information about the dev mailing list