openintents / shoppinglist

OI Shopping List
http://openintents.org/shoppinglist
64 stars 49 forks source link

Locale aware sorting #43

Open Sora1248 opened 7 years ago

Sora1248 commented 7 years ago

The alphabetical sorting of the shopping list should be locale aware.

At the moment the app seems to sort the list according to the letter's codepoint or raw byte-value. As a result the German umlauts and ß are sorted after the z. When sorting words in German the letters ä, ö, ü and ß are sorted as if they where a, o, u and ss accordingly. Foreign latin letters with accents etc. are sorted as if they have no accents. This makes finding existing entries in the list surprisingly hard, especially if the words begin with an umlaut.

As these rules are specific to the German language and other languages will sort these letters at other positions (Swedish, Finnish) I'll suggest to use some existing locale aware functions to implement this.