Ludovic Courtès wrote:
> >    263:19  1 (%number-integer-part "123456" (-1 -1 -1 -1 -1 -1 . #) "")
> 
> That’s the problem: the locale contains erroneous digit grouping
> information.  It should be a circular list of ‘3’, like this:

You may be misunderstanding the glibc format of the grouping information
returned by the nl_langinfo function. As you can see
  - from glibc/stdio-common/printf_fp.c, function __guess_grouping,
  - from glibc/stdio-common/vfprintf.c, function group_number,
when the first value in the array is zero or negative or 127, it means
"no grouping should be done".

The POSIX description of 'grouping' for localeconv() [1] and the description in
glibc's manual [2] don't mention negative numbers, but yes, sometimes you need
to look into the source code to understand glibc specific details.

Bruno

[1] http://pubs.opengroup.org/onlinepubs/9699919799/functions/localeconv.html
[2] http://www.gnu.org/software/libc/manual/html_node/General-Numeric.html

-- 
In memoriam Henri Salmide <http://en.wikipedia.org/wiki/Henri_Salmide>

Reply via email to