From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#20316: 24.5; `string-lessp' doesn't respect value of LC_COLLATE Date: Tue, 14 Apr 2015 17:57:32 +0300 Message-ID: <83r3rmbvvn.fsf@gnu.org> References: <87twwk61re.fsf@gmail.com> <87h9sk5z6a.fsf@gmx.de> <87pp785y21.fsf@gmail.com> <83twwkccdk.fsf@gnu.org> <87egnn5y06.fsf@gmail.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT X-Trace: ger.gmane.org 1429023509 24572 80.91.229.3 (14 Apr 2015 14:58:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 14 Apr 2015 14:58:29 +0000 (UTC) Cc: michael.albinus@gmx.de, 20316@debbugs.gnu.org To: Alexis Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Apr 14 16:58:18 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Yi2I6-0005YT-8t for geb-bug-gnu-emacs@m.gmane.org; Tue, 14 Apr 2015 16:58:18 +0200 Original-Received: from localhost ([::1]:56279 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yi2I5-0005Uz-Ny for geb-bug-gnu-emacs@m.gmane.org; Tue, 14 Apr 2015 10:58:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41253) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yi2Hw-0005UL-VX for bug-gnu-emacs@gnu.org; Tue, 14 Apr 2015 10:58:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yi2Hr-0001IR-21 for bug-gnu-emacs@gnu.org; Tue, 14 Apr 2015 10:58:08 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:38303) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yi2Hq-0001II-Uu for bug-gnu-emacs@gnu.org; Tue, 14 Apr 2015 10:58:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Yi2Hq-0002zA-CS for bug-gnu-emacs@gnu.org; Tue, 14 Apr 2015 10:58:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 14 Apr 2015 14:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20316 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 20316-submit@debbugs.gnu.org id=B20316.142902344911433 (code B ref 20316); Tue, 14 Apr 2015 14:58:02 +0000 Original-Received: (at 20316) by debbugs.gnu.org; 14 Apr 2015 14:57:29 +0000 Original-Received: from localhost ([127.0.0.1]:56312 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Yi2HJ-0002yL-2j for submit@debbugs.gnu.org; Tue, 14 Apr 2015 10:57:29 -0400 Original-Received: from mtaout21.012.net.il ([80.179.55.169]:53138) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Yi2HG-0002y8-Uc for 20316@debbugs.gnu.org; Tue, 14 Apr 2015 10:57:27 -0400 Original-Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0NMS00L00X9HDU00@a-mtaout21.012.net.il> for 20316@debbugs.gnu.org; Tue, 14 Apr 2015 17:57:20 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NMS00LE2XJJBB70@a-mtaout21.012.net.il>; Tue, 14 Apr 2015 17:57:20 +0300 (IDT) In-reply-to: <87egnn5y06.fsf@gmail.com> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:101513 Archived-At: > From: Alexis > Cc: Eli Zaretskii , 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.