emacs-orgmode
[Top][All Lists]
Advanced

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

Re: test-org-table/sort-lines: Failing test on macOS


From: Max Nikulin
Subject: Re: test-org-table/sort-lines: Failing test on macOS
Date: Thu, 24 Nov 2022 00:01:04 +0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2

On 23/11/2022 22:27, Max Nikulin wrote:

(setq lst '("semana" "señor" "sepia"))
(sort lst #'string-lessp) ;         => ("semana" "sepia" "señor")
(sort lst #'string-collate-lessp) ; => ("semana" "señor" "sepia")

On 23/11/2022 17:37, Ihor Radchenko wrote:
Eli even argued that `string-collate-lessp' is strictly worse compared
to more predictable approach. See
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=59275#40

I think, Eli is afraid of the following sort of inconsistency

(string-collate-lessp "z" "ö" "de_DE.UTF-8") ; => nil
(string-collate-lessp "z" "ö" "sv_SE.UTF-8") ; => t

Mixed language example: U+0049 LATIN CAPITAL LETTER I vs. U+0406 CYRILLIC CAPITAL LETTER BYELORUSSIAN-UKRAINIAN I

(sort '("Івана" "Ivan" "Термін" "Вони")
      (lambda (a b) (string-collate-lessp a b "uk_UA.UTF-8")))
("Вони" "Івана" "Термін" "Ivan")

(sort '("Івана" "Ivan" "Термін" "Вони")
      (lambda (a b) (string-collate-lessp a b "en_US.UTF-8")))
("Ivan" "Вони" "Івана" "Термін")

I suppose users should get result native to their languages even though others may get another order.




reply via email to

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