|
From: | Paul Eggert |
Subject: | Re: RFC: locale-sensitive Emacs functions |
Date: | Mon, 27 Mar 2017 21:37:56 -0700 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 |
Gdobbins wrote:
In Common Lisp, such directives use : rather than ', but more importantly they also take arguments to specify the grouping and the separation character.
The ' flag is the only printf flag that the POSIX printf function supports but the Emacs 'format' function does not. When I looked into this a while ago I remember concluding that I was glad I didn't have to write code to support the ' flag, as it would require messing with the LC_NUMERIC locale setting (currently hardwired to "C" for other good reasons) and would make for some work redoing carefully-calculated output buffer sizes internal to 'format', not to mention the character set conversion that would be required.
For what it's worth, the Common Lisp approach cannot handle the Indian numbering system, which has a comma every two digits except that the last grouping contains three digits (e.g., "12,34,56,789"). This is something that POSIX can do.
[Prev in Thread] | Current Thread | [Next in Thread] |