[OSM-dev] usernames, keys, and values
Anthony
osm at inbox.org
Wed Oct 28 14:11:52 GMT 2009
On Tue, Oct 27, 2009 at 9:22 PM, Matt Amos <zerebubuth at gmail.com> wrote:
> On 10/28/09, Anthony <osm at inbox.org> wrote:
>> Regarding usernames, keys, and values in the OSM database, are there
>> are restrictions on what characters are allowed? Tabs, carriage
>> returns, line feeds, nulls? All allowed?
>
> i think the current set of allowed characters are those which are in
> the XML character range: http://www.w3.org/TR/REC-xml/#NT-Char
>
> this includes \t, \n and \r, but not nulls. to be honest, i can't see
> a good use for these characters, but someone out there is bound to be
> using them for something ;-)
>
> cheers,
>
> matt
Just took a look at the planet dump code at
http://svn.openstreetmap.org/applications/utils/planet.osm/C/output_osm.c
In xmlescape(): "} else if ((*in >= 0) && (*in < 32)) {
escape_tmp[len] = '?'; len++; } else {"
So, it looks like \t, \n,and \r are all illegal, or at least will get
silently converted to "?" by the planet dumper. I can confirm that
these three characters don't actually exist in the current planet
dump.
Still somewhat ambiguous if they're actually illegal. At least, I
haven't found any documentation on this. But for now I guess I'll
assume they are.
Anthony
More information about the dev
mailing list