Topic on Project:Support desk

Automatik (talkcontribs)

Hi,

In Help:Sorting#Sort order, we can see that capital letters are ordered before small letters. But in fact, is it really the case?

It seems that no, as you can see it for example on https://fr.wiktionary.org in this category : Paris is placed in the letter "p" whereas Paris doesn't contain (even after expansion of the models) the magic word DEFAULTSORT.

Is this table of sort order wrong?

Thanks by advance for your answer.

Regards,

Bawolff (talkcontribs)

It depends on the sorting method being used by the wiki:

  • Prior to 1.17 it was always true that all capital letters were sorted before all lowercase (So 'Z' comes before 'a'. Basically we used to binary order of code points)
  • After that we changed it to be case insensitive by default (but still code point order). So 'a' and 'A' are considered the exact same letter. Its still possible to go back to the old behaviour if it is desired.
  • We also added an option for uca collation ordering. This allows per language customization, using a much more complex algorithm. So for example, 'a' and 'A' are considered exactly the same, unless there is a tie, and then its used as a tie breaker. (It sorts on 3 levels - different letters, followed by different accents, followed by upper-case vs lower-case). See $wgCategoryCollation for details on that.
Reply to "Sort order"