My emacs is from homebrew without any manual settings on locale. I assume a number of locale settings come with it. I have not had any problems before this.
OS X does not have LANG envvar set. This computer came with Finnish language set and I switched to English (Australian) for interface. This has lead to somewhat weird locale setting at OS:
$ defaults read .GlobalPreferences AppleLanguages
(
"en-FI"
)
Apart from ssa, the output from string-collate-lessp seems to be what is to be expected:
(string-collate-lessp "a" "x" "de_DE.utf-8" nil) ; t
(string-collate-lessp "a" "X" "de_DE.utf-8" nil) ; nil
(string-collate-lessp "ß" "ssa" "de_DE.utf-8") ; nil
(string-lessp "ß" "ssa") ; nil
(string-collate-lessp "ä" "ö" "fi_FI.utf-8") ; t
(string-collate-lessp "Ä" "ö" "fi_FI.utf-8") ; t
I can not able to comment on C code, but it really seems that alphabetic sorting is fixed to case-sensitive mode.