3 ms·
In my experience when you have a DB field where you take sorting very seriously (because you're writing a dictionary and/or the data is meant to be circulated i
by DemocracyFTW2 4y ago
In my experience when you have a DB field where you take sorting very seriously (because you're writing a dictionary and/or the data is meant to be circulated in printed form) you'll want to use basic lexicographic sorting (by Unicode code points, LC_COLLATE="C.UTF-8" IIRC) and build a sort field yourself. I just tried the ICU collation demo at https://icu4c-demos.unicode.org/icu-bin/collation.html https://icu4c-demos.unicode.org/icu-bin/collation.html and while they do have both German phonebook and German general-purpose collation orders, the former cannot be used for dictionaries and the latter sorts abel, äbel, aber, äber as abel, aber, äbel, äber, which I find wrong. Instead of mucking with collation APIs, it's much easier to rewrite your strings and use lexicographic (codepoint-based) collation; in the case here, rewriting as a0bel, a1bel, a0ber, a1ber could work.