[OSM-dev] Escaping special characters when writing tags in OSM files with osm-subset.pl & write.pm

Jon Burgess jburgess at uklinux.net
Sun Nov 5 00:49:56 GMT 2006


I've found that both osm-subset.pl and Geo::OSM::Write fail to escape
characters like " & ' in tags leading to problem when trying to parse
the OSM that they write. 

The attached patches made them work for me although I still seem to be
seeing some UTF-8 related issues (though UTF8sanitizer fixes these up).
Does anyone know if there is a better way to be generating valid XML?

The patch to osm-subset.pl also fixes it to work with .bz2 compressed
planet.osm files.


   Jon

-------------- next part --------------
A non-text attachment was scrubbed...
Name: escaping-osm-write.patch
Type: text/x-patch
Size: 534 bytes
Desc: not available
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20061105/8d97fcd5/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: escaping-osm-subset.patch
Type: text/x-patch
Size: 855 bytes
Desc: not available
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20061105/8d97fcd5/attachment-0001.bin>


More information about the dev mailing list