[OSM-dev] REST API encoding
Thomas Walraet
thomas at walraet.com
Tue Jul 11 13:30:50 BST 2006
Found it !
This is a server inconsistency in charset use.
Server use ISO-8859-1 for segment and way request, but a mix of
ISO-8859-1 and UTF-8 for map request.
If someone has the time to look at this... The server should only use
UTF-8 (as it does actually for ways in the map request) so we could
update clients and close trac tickets #28 and #29.
Here is the reply for single segment :
> http://www.openstreetmap.org/api/0.3/segment/321212
> <?xml version="1.0"?>
> <osm version="0.3" generator="OpenStreetMap server">
> <segment id="321212" from="368126" to="368125" visible="true"
> timestamp="2006-07-11 00:21:24">
> <tag k="name" v="tést"/>
> </segment>
> </osm>
For single way :
> http://www.openstreetmap.org/api/0.3/way/2375776
> <?xml version="1.0"?>
> <osm version="0.3" generator="OpenStreetMap server">
> <way id="2375776" timestamp="2006-07-11 00:15:15">
> <seg id="321242"/>
> <seg id="321241"/>
> <tag k="name" v="tést"/>
> </way>
> </osm>
And for the "map" request :
http://www.openstreetmap.org/api/0.3/map?bbox=2.35050892829895,48.849458022965294,2.3580191135406494,48.85298789870628
<?xml version="1.0"?>
<osm version="0.3" generator="OpenStreetMap server">
[..]
<segment id="321212" from="368126" to="368125">
<tag k="name" v="tést"/>
</segment>
[..]
<way id="2375776" timestamp="2006-07-11 00:15:15">
<seg id="321242"/>
<seg id="321241"/>
<tag k="name" v="tést"/>
</way>
[..]
</osm>
A9 is the hex code for é in ISO-8859-1
C3A9 is the hex code for é UTF-8
(PS: I can't log to trac at the moment. Got 500 server response)
More information about the dev
mailing list