special characters in tags
Tobias Knerr
osm at tobias-knerr.de
Thu Jun 23 18:29:28 UTC 2022
On 23.06.22 at 19:12, Martin Koppenhoefer wrote:
> in the German forum the question arose whether the “+” is an allowed char in tags:
>
> https://forum.openstreetmap.org/viewtopic.php?pid=865766#p865766
>
> Maybe the validator is overzealous here, or is generally agreed that some characters should not be used?
While the API accepts these characters, it is indeed good practice to
avoid them in keys. (We even usually avoid spaces!)
Of course, data consumers need to be able to handle them because they do
sometimes appear in the database. See e.g. these Taginfo stats on
"problematic characters":
https://taginfo.openstreetmap.org/reports/characters_in_keys
Still, having to escape them in all sorts of contexts (not just as a
programmer, but also as an experienced mappers using search and query
tools, for example) can still be annoying and is a frequent source of
various issues. So the validator is right to warn about it IMO.
Not sure if it's written down anywhere "official". The best I could find
was this wiki section:
https://wiki.osm.org/Any_tags_you_like#Syntactic_conventions_for_new_tags
More information about the josm-dev
mailing list