[I am adding Rudolf's email back to CC just in case] Max Nikulin <maniku...@gmail.com> writes:
>> Should we then modify the test to set locale explicitly? > > Rudolf cited the context of this test and "C" locale is explicitly used > there. Oops. Missed it. Thanks for the clarification. >> Note that Rudolf is using Emacs 29. > > and macOS, so libc and locales version may be different as well. [Max, correct me if my further suggestion is wrong.] Rudolf, can you (1) try sort in terminal to confirm that "C" locale behaves as expected in MacOS; (2) If sort works fine, you may consider reporting Emacs bug. > If libc is sane (assuming that sort is linked to the same libc) > > printf 'a\nb\n' | LC_COLLATE=C sort > printf 'b\na\n' | LC_COLLATE=C sort > printf 'A\nB\n' | LC_COLLATE=C sort > printf 'B\nA\n' | LC_COLLATE=C sort > printf 'a\nb\n' | LC_COLLATE=C.UTF-8 sort > printf 'b\na\n' | LC_COLLATE=C.UTF-8 sort > printf 'A\nB\n' | LC_COLLATE=C.UTF-8 sort > printf 'B\nA\n' | LC_COLLATE=C.UTF-8 sort > > then you might face an Emacs bug. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at <https://orgmode.org/>. Support Org development at <https://liberapay.com/org-mode>, or support my work at <https://liberapay.com/yantar92>