This is apparently the expected behavior, and also seems to be the correct way to sort alphabetically in French.
Android javadoc gives a hint why it behaves this way - I believe that the implementation details in android are similar, if not identical to the JDK standard:
The tertiary difference is ignored if there is a primary or secondary difference in each row.
In other words, since your 2 lines are sorted only by looking at the primary differences (excluding accents), the collator does not check for other differences.
It seems to be compatible with Unicode Collation Algorithm (UCA) :
Percentage differences are usually ignored if the base letters are different.
And this also seems to be the right way to sort alphabetically in French, according to the wikipedia article “ordre alphabetique” :
En première analysis, les caractères accentués, de même que les majuscules, on the le même rang alphabétique que le caractère fondamental
Si plusieurs mots ont le même rang alphabétique, at the same de le-ling-a-end-e-e-e-e-e-e-e-n-n-n-n-n-n, n -accent (pour le e, on l'ordre e, é, è, ê, ë)
In English: at first the order ignores the accents and the case - if 2 words cannot be sorted in this way, then the accents and the case are taken into account.
assylias
source share