Hi,

(Cc: Bruno for additional insight.)

David Fang <[email protected]> writes:

> % ldd --version `which guile-2.0`
> ldd (GNU libc) 2.3.4

Ouch, that’s very old.

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

  scheme@(ice-9 i18n)> (locale-digit-grouping (make-locale LC_ALL "fr_FR"))
  $5 = (3 . #0#)

Likewise, the thousand separator (last argument in the frame above) is
the empty string, whereas it should be a space:

  scheme@(ice-9 i18n)> (locale-thousands-separator (make-locale LC_ALL "fr_FR"))
  $7 = " "

I think it’s a bug in that version of glibc or its locale data.  I
suppose our nl_langinfo wrapper could filter out negative grouping
values since that doesn’t seem to have any meaning.  Thoughts?

Just to make sure can you try this variant:

  scheme@(ice-9 i18n)> (setlocale LC_ALL "fr_FR.utf8")
  $10 = "fr_FR.utf8"
  scheme@(ice-9 i18n)> (locale-digit-grouping)
  $12 = (3 . #0#)

Thanks,
Ludo’.

Reply via email to