bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#59275: Unexpected return value of `string-collate-lessp' on Mac


From: Ihor Radchenko
Subject: bug#59275: Unexpected return value of `string-collate-lessp' on Mac
Date: Tue, 15 Nov 2022 15:05:48 +0000

Eli Zaretskii <eliz@gnu.org> writes:

>> On Emacs 29 (adaa2fc90e) MacOS build:
>> 
>> (string-collate-lessp "a" "B" "C" t)  ; => nil
>> 
>> On Linux:
>> 
>> (string-collate-lessp "a" "B" "C" t) ; => t
>> 
>> The return value on MacOS is unexpected.
>
> string-collate-lessp is inherently platform- (and locale-) dependent.
> Don't use it if you want consistent results across platforms and
> locales.

Is there a better alternative?
Also, do I miss something, or is this pitfall not documented in the
docstring of `string-collate-lessp'?

-- 
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>





reply via email to

[Prev in Thread] Current Thread [Next in Thread]