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".
David: can you try this patch?
Hi,
After applying patch and re-running tests:
Running i18n.test
FAIL: i18n.test: number->locale-string: French: integer
FAIL: i18n.test: number->locale-string: French: fraction
FAIL: i18n.test: number->locale-string: French: fraction, 1 digit
I then tried:
% meta/uninstalled-env guile
GNU Guile 2.0.0
Copyright (C) 1995-2011 Free Software Foundation, Inc.
Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'.
This program is free software, and you are welcome to redistribute it
under certain conditions; type `,show c' for details.
Enter `,help' for help.
scheme@(guile-user)> (use-modules (ice-9 i18n))
scheme@(guile-user)> (let ((fr (make-locale LC_ALL "fr_FR.utf8")))
(number->locale-string 123456 #t fr))
$1 = "123456"
Does this match your expectations?
Fang
David Fang
http://www.csl.cornell.edu/~fang/
http://www.achronix.com/