by praptak · 1y ago · 0 comments
"Ordering of words follows simply from ordering on the letters in the alphabet" - nope, Spanish "ll" is not in the alphabet and is sorted like a single special letter.
"It's always lexicographical left to right or at least lexicographical in a single, consistent direction?" - nope, accents in French (è,é) are compared right-to-left.
Until 2010, the Real Academia Española (along the other Academias, of the various countries that speak spanish), considered both “Ll” and “Ch” distinct letters of the alphabet, and they were sorted accordingly [0][1][2].
[0] https://www.rae.es/dpd/abecedario (in Spanish)
[1] https://www.rae.es/dpd/ll (in Spanish)
[2] https://www.rae.es/dpd/ch (in Spanish)
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...