[OSM-talk] Name vs name tag (case sensitivity)

Ed Davies osm at edavies.nildram.co.uk
Mon Jan 29 14:01:04 GMT 2007


Ben Ward wrote:
  > Just a thought, but is there a great deal of point in having case-sensitive
  > keys?  Can anyone think of a situation where it's more useful than it is
  > confusing to have two keys with the same name, but differing case?

Kristian Thy replied:
> It's not a decision to use case-sensitive keys per se, it's grounded in
> XSLT et al being case sensitive.

It's worth adding that many systems these days (including the
XML family) tend to be case sensitive because, in general, it's
difficult to fold case accurately if you don't know what language
the text is in.

For example, in most European languages the upper case of the small
letter "i" is a capital letter "I" (Unicode characters U+0069 and
U+0049 respectively).  However, in Turkish and Azerbaijani, the
upper case form of U+0069 is U+0130 (LATIN CAPITAL LETTER I WITH
DOT ABOVE, İ) and similarly the lower case form of I is U+0131
(LATIN SMALL LETTER DOTLESS I, ı).

(I've put these "odd" characters in here but I expect they'll
get messed up by the mailing list system.  Ouch.)

This is a bit of a corner case for most of us but has caused a
lot of irritation in some countries.

To not make a mess of things in odd situations you have to know
the language (either explicitly with something like xml:lang or
the equivalent) or implicitly - OSM tags are implicitly in
something a bit like English, for example.  Therefore, any case
folding has to be application specific, it often can't (or
shouldn't) be done by "infrastructure" code without explicit
instruction.

IMHO, OSM editing tools should give a warning (not an error) if
you try to add non-standard tags.  This would catch mistakes like
using "Name" or "hihgway" much better than any attempt at case
folding.

Ed.







More information about the talk mailing list