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

Dean Earley dean at earlsoft.co.uk
Sun Nov 5 22:27:27 GMT 2006

Jon Burgess wrote:
> 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.

 From memory, & SHOULDN'T be escaped in XML files.
I was surprised when I read this but it fixed my RSS feed.. :)

Dean Earley, Dee (dean at earlsoft.co.uk)

irc:    irc://irc.blitzed.org/
web:    http://personal.earlsoft.co.uk
phone:  +44 (0)780 8369596

More information about the dev mailing list