Why does the sort command sorts indifferently "œ" and "oe" in French locale? Why does the sort command sorts indifferently "œ" and "oe" in French locale? unix unix

Why does the sort command sorts indifferently "œ" and "oe" in French locale?


Dictionary sort may be ignoring the œ ligature because it is not in the range a-zA-Z in ascii. (This is a guess).

Then in the French locale, œ and oe compare as equal, so they should come out in whatever order they went in, which is what seems to be happening to you. If that's correct, then if you put this in:

cœzcoezcœmcoemcoepcœpcoecœ

You should get this:

coecœcœmcoemcoepcœpcœzcoez

You can use the -c (check if file is sorted) or -r (reverse order) options to get more.