Hacker News new | ask | show | jobs
by josemfb 517 days ago
Native speaker of Spanish here (from Spain, living in Chile). “Ll” is sorted as two independent letters, same as “Ch”.

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)

2 comments

I was JUST making a demo showing that sorting is different per locale (using String.prototype.localeCompare() in JS) and I was SHOCKED that Spanish no longer orders things "langosta, lugar, llama" but rather "langosta, llama, lugar." I had to redo things to do German vs Swedish sorting (In German, ä comes between a and b, whereas in Swedish it comes after z). So here I was thinking that the browsers were sorting naively, but in fact they are more with the times than I am.

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...

Yeah thanks for the correction, I don't know Spanish, I just remembered this example from a long list of international sorting oddities.