
On Thu, Jul 02, 2009 at 09:30:30AM +0100, Dermot McNally wrote:
2009/7/2 Toby Speight <T.M.Speight.90@cantab.net>:
That's not the best way to do a case-insensitive test - the reason being that in some languages (e.g. French, I think) upper case letters have no accents. So "Ecole" should match "école" (again, excuse my poor French if necessary!). Also, in German, "Straße" should match "STRASSE".
Your point probably still stands (for the German case anyway, where you also need to regard, say, ae as equivalent to ä), but French does now place accents on uppercase letters.
Actually, the conversion to upper case also depends on the locale. Here is how: Turkish uses both a dotted i and a dotless I, both in upper and lower case. In most other locales, the upper-case variant of i is I, but not in Turkish. Also, comparing upper-case strings would not solve all issues. For example, in Swedish and Finnish, v and w are sometimes sorted at the same position. I'm not sure if these examples really matter that much when comparing common names. For proper names, there may be alternative spellings (such as old Finnish names containing W instead of V), but common names, such as station or hotel, should use a uniform spelling. Perhaps this could best be addressed by writing explicit rules for all the possible spellings and abbreviations (if they have been used contrary to advice). E.g., Straße, Strasse, Str.; Bahnhof, Hauptbahnhof, Hbf. One last word: instead of editing the name tags (with things like default_name or prefixing or affixing "station"), I would rather include the TYP file information in the mkgmap style definition. As far as I know, labels cannot be multilingual in the Garmin format except in the TYP file. Doing something about this is on my long-term TODO list. Marko