From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Rasmus Newsgroups: gmane.emacs.help Subject: Re: Alternative to string< that works "well" with unicode Date: Fri, 28 Nov 2014 09:43:50 +0100 Message-ID: <87wq6f4svt.fsf@gmx.us> References: <87egsourpc.fsf@kuiper.lan.informatimago.com> <873894go73.fsf@gmx.us> <83ppc7n34g.fsf@gnu.org> 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 1417164287 20158 80.91.229.3 (28 Nov 2014 08:44:47 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 28 Nov 2014 08:44:47 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Nov 28 09:44:40 2014 Return-path: Envelope-to: geh-help-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 1XuHAM-0004Vf-7L for geh-help-gnu-emacs@m.gmane.org; Fri, 28 Nov 2014 09:44:38 +0100 Original-Received: from localhost ([::1]:43056 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XuHAL-00057R-QY for geh-help-gnu-emacs@m.gmane.org; Fri, 28 Nov 2014 03:44:37 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53361) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XuH9w-0004w6-KH for help-gnu-emacs@gnu.org; Fri, 28 Nov 2014 03:44:17 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XuH9r-0008Ns-69 for help-gnu-emacs@gnu.org; Fri, 28 Nov 2014 03:44:12 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:38723) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XuH9q-0008Nl-Vw for help-gnu-emacs@gnu.org; Fri, 28 Nov 2014 03:44:07 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1XuH9m-0004IS-Qa for help-gnu-emacs@gnu.org; Fri, 28 Nov 2014 09:44:02 +0100 Original-Received: from 46.166.186.247 ([46.166.186.247]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 28 Nov 2014 09:44:02 +0100 Original-Received: from rasmus by 46.166.186.247 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 28 Nov 2014 09:44:02 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 36 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 46.166.186.247 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAAAAAByaaZbAAAAAmJLR0QA/4ePzL8AAAAJcEhZ cwAAAEgAAABIAEbJaz4AAAINSURBVEjH1ZbLcRtBEENVnRESQShIBZEgFsQwmfgwuxJlzsr20Tyy 5hH9Bz/mHz8f/w0A4F8AiJKImcHfAJDo2DHxJnUCSMl2kkQy8QcAJG+gaWv8AQAo+37eNvwbhaRt 11rfiY+TALgj+iSSH4HPHPb7tdaLxDtAkFR2zl2rq211AHALgLmL1HZ1rcbvAISdMkCSctqmW8AH gNaV8paikiY7ab+HBJlXTTHDjSjuahvhHdg/AsoEfX/JpK1PAK85si2SGIDWgEqj9z7ckdOORZKk r+Lw1OmdLMAksSSTbu7eHDpNbmCPtW3JDS1+W6MXQLySzrUJciPK1BGAOAPSX0BaS7KB0ywBA1Jb wSadlSZtXhb1FeA9qLFN2Vld7arBJ0CS5NgAlD1HDaDTPpAg93tiBlTSNtG5rEOAIuV76cFkNQHP VQJAivqSH7WN5nw1dsYiX07EpDUe7tIGSO4C3xKxzgD2opGcXStcADg/A5I0IM2Z4dcy/wDsotCa UfAAAAAFQr6AMYcvm/OeNEWCtHVtNGk/GAqugABATmI5tvXgQCBBi9iB7Uuc3wt6ASIoCZAJzAw/ /URHj4ttOSKju6cAKfFsitcCR+K3IYDOPvrRtpEdMi/eJGueFNomibAlMDN0/GDUH23XiptEGA60 74CejD1tV7cVhANxH43Hvw7taleSpCsYkk3CJ+AXriLS9q3U4kkAAAAASUVORK5CYII= User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/24.4.51 (gnu/linux) Cancel-Lock: sha1:wP9jcDzlRsG5oakNWwj4WbQBSaE= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:101258 Archived-At: Eli Zaretskii writes: >> From: Rasmus >> Date: Fri, 28 Nov 2014 01:32:00 +0100 > >> >> > I think Emacs bug#18051 is relevant. >> >> Thanks, the bug pointed me to `string-collate-lessp': >> >> (sort '(É E T A À Z) 'string-collate-lessp) >> => (A À E É T Z) >> >> Pretty cool! > > Yes, it is. But please be aware that the results are heavily > locale-dependent; in particular, a non-UTF-8 locale on a typical > GNU/Linux system might behave very differently. Likewise on systems > where the standard C library is not glibc. > > The upshot of all this is that the results of such sorting are > excellent from the local user POV, but should not be considered as > stable across locales and systems, and therefore Lisp programs that > are expected to be distributed should not rely on the resulting order > too much. The particular usecase I had in mind is sorting in EMMS. Here, local-dependent sorting seems like a plus, and the particular order is not so interesting. Thanks everyone! —Rasmus -- There are known knowns; there are things we know that we know