From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.devel Subject: Re: RFC: locale-sensitive Emacs functions Date: Mon, 27 Mar 2017 21:37:56 -0700 Organization: UCLA Computer Science Department Message-ID: <721338e4-fad3-e33c-2a77-59107fbe1ff2@cs.ucla.edu> References: <87lgrq5ccp.fsf@lifelogs.com> <8Sj4h1O1rGU3p2OhVtn_8rleNKxYpeaUgnELj6kkM2iv3vXZWKaY0viThS1GwHfnf3EhDqooeJbfbOvbk-YBLpVI4znjtvf9Ot3G4ej8YJM=@protonmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1490675936 14052 195.159.176.226 (28 Mar 2017 04:38:56 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 28 Mar 2017 04:38:56 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 To: Gdobbins , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Mar 28 06:38:48 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1csitu-0001TD-0n for ged-emacs-devel@m.gmane.org; Tue, 28 Mar 2017 06:38:34 +0200 Original-Received: from localhost ([::1]:49947 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1csitz-00058C-PR for ged-emacs-devel@m.gmane.org; Tue, 28 Mar 2017 00:38:39 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53479) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1csitR-000586-OP for emacs-devel@gnu.org; Tue, 28 Mar 2017 00:38:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1csitO-00025n-Li for emacs-devel@gnu.org; Tue, 28 Mar 2017 00:38:05 -0400 Original-Received: from zimbra.cs.ucla.edu ([131.179.128.68]:59396) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1csitO-00024Q-Fw for emacs-devel@gnu.org; Tue, 28 Mar 2017 00:38:02 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 6A9CF1600A8; Mon, 27 Mar 2017 21:38:00 -0700 (PDT) Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id FvEjDRKRrTuk; Mon, 27 Mar 2017 21:37:59 -0700 (PDT) Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id AC3A11600AD; Mon, 27 Mar 2017 21:37:59 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id GiWbSF26cxzp; Mon, 27 Mar 2017 21:37:59 -0700 (PDT) Original-Received: from [192.168.1.9] (unknown [47.153.188.248]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 8E9011600A8; Mon, 27 Mar 2017 21:37:59 -0700 (PDT) In-Reply-To: <8Sj4h1O1rGU3p2OhVtn_8rleNKxYpeaUgnELj6kkM2iv3vXZWKaY0viThS1GwHfnf3EhDqooeJbfbOvbk-YBLpVI4znjtvf9Ot3G4ej8YJM=@protonmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 131.179.128.68 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:213437 Archived-At: Gdobbins wrote: > In Common Lisp, such directives use : rather than ', but more important= ly they also take arguments to specify the grouping and the separation ch= aracter. The ' flag is the only printf flag that the POSIX printf function support= s but=20 the Emacs 'format' function does not. When I looked into this a while ago= I=20 remember concluding that I was glad I didn't have to write code to suppor= t the '=20 flag, as it would require messing with the LC_NUMERIC locale setting (cur= rently=20 hardwired to "C" for other good reasons) and would make for some work red= oing=20 carefully-calculated output buffer sizes internal to 'format', not to men= tion=20 the character set conversion that would be required. For what it's worth, the Common Lisp approach cannot handle the Indian nu= mbering=20 system, which has a comma every two digits except that the last grouping=20 contains three digits (e.g., "12,34,56,789"). This is something that POSI= X can do.