From: Eli Zaretskii <eliz@gnu.org>
To: Alexis <flexibeast@gmail.com>
Cc: michael.albinus@gmx.de, 20316@debbugs.gnu.org
Subject: bug#20316: 24.5; `string-lessp' doesn't respect value of LC_COLLATE
Date: Tue, 14 Apr 2015 17:57:32 +0300 [thread overview]
Message-ID: <83r3rmbvvn.fsf@gnu.org> (raw)
In-Reply-To: <87egnn5y06.fsf@gmail.com>
> From: Alexis <flexibeast@gmail.com>
> Cc: Eli Zaretskii <eliz@gnu.org>, michael.albinus@gmx.de
> Date: Tue, 14 Apr 2015 10:55:53 +1000
>
> So by default, Emacs sorts disregarding locale-specific ordering, basically using the Unicode codepoints of the characters to order them.
>
> This makes sense given what you've said above, but can this still be referred to as 'lexicographic' ordering? To me, 'lexicographic ordering' is ordering as per a dictionary for the relevant language, not by codepoint for an arbitrary encoding. Is this wrong?
I think we use "lexicographic" for lack of a more accurate word. We
could use something like "code point (binary) order", but would that
be clear enough to be useful?
Note that we are not alone in this; at least this page:
http://en.cppreference.com/w/cpp/string/byte/strcoll
says that the C function 'strcmp' does a "lexicographical comparison".
So do a few other similar pages; google for "difference between strcmp
and strcoll".
> One of the package's users had imported a set of contacts, then expected to be able to sort those contacts according to Croatian rules, using `org-sort' (from `org.el'). However, to quote the user, this resulted in the contacts being sorted according to the English alphabet rules where the contact entries which start with Croatian characters (Č,Ć,Đ,Š,Ž) are at the end of the list, iow. after 'Z' entries, although it should go like this:
>
> A,B,C,Č,Ć,D,Dž,Đ,..S,Š,..Z,Ž
That's "collation order" in action, note that the diacritic order is
applied _after_ the alphabetic order of the base characters. That's
what string-collate-lessp does.
next prev parent reply other threads:[~2015-04-14 14:57 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-13 5:22 bug#20316: 24.5; `string-lessp' doesn't respect value of LC_COLLATE Alexis
2015-04-13 5:59 ` Alexis
2015-04-13 6:18 ` Michael Albinus
2015-04-13 6:42 ` Alexis
2015-04-13 6:53 ` Michael Albinus
2015-04-13 14:48 ` Eli Zaretskii
2015-04-14 0:55 ` Alexis
2015-04-14 14:57 ` Eli Zaretskii [this message]
2015-04-14 23:55 ` Alexis
2015-04-15 1:23 ` Stefan Monnier
2015-04-13 14:10 ` Paul Eggert
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83r3rmbvvn.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=20316@debbugs.gnu.org \
--cc=flexibeast@gmail.com \
--cc=michael.albinus@gmx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.