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

Joerg Ostertag (OSM Munich/Germany) openstreetmap at ostertag.name
Mon Nov 6 07:21:52 GMT 2006


On Sunday 05 November 2006 01:49, 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.

What about putting the code for escaping into a function inside the 
utils/perl/Geo/ Tree and using it from there?

And: can you please add your patch to SVN.

-- 
Jörg (Germany, Munich)

http://www.ostertag.name/
TeamSpeak2: ts2.ostertag.name, user: tweety, Channel: "GPS Drive"
irc://irc.oftc.net/#osm
Tel.: +49 89 420950304




More information about the dev mailing list