Hi Bruno,

Thanks for the quick reply.

Bruno Haible <[email protected]> writes:

> 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.

Yes, the description just mentions CHAR_MAX, which seems to be honored
in recent glibcs and Darwins.

I’ll submit a patch later today.

Thanks,
Ludo’.

Reply via email to