[OSM-dev] JOSM/OSM Charset problems

Thomas Walraet thomas at walraet.com
Sun Jun 18 14:36:54 BST 2006


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

** 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.


-- 
Thomas Walraet




-------------- next part --------------
A non-text attachment was scrubbed...
Name: josm-charset.patch
Type: text/x-patch
Size: 1244 bytes
Desc: not available
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20060618/7bf8c7e8/attachment.bin>


More information about the dev mailing list