GNU bug report logs -
#77622
coreutils-9.6.53-14af8 on Solaris 11 OpenIndiana
Previous Next
To reply to this bug, email your comments to 77622 AT debbugs.gnu.org.
There is no need to reopen the bug first.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-coreutils <at> gnu.org
:
bug#77622
; Package
coreutils
.
(Tue, 08 Apr 2025 00:39:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Bruno Haible <bruno <at> clisp.org>
:
New bug report received and forwarded. Copy sent to
bug-coreutils <at> gnu.org
.
(Tue, 08 Apr 2025 00:39:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Solaris OpenIndiana, there is one test failure:
FAIL: tests/misc/numfmt
Specifically, the tests lcl-fmt-2, lcl-fmt-3 fail. See the attached log file.
I can easily reproduce it:
$ LC_ALL=fr_FR.UTF-8 src/numfmt --format "--%'10f--" 50000
--50�000--
whereas
$ LC_ALL=en_US.UTF-8 src/numfmt --format "--%'10f--" 50000
-- 50,000--
What happens is that numfmt prepares a format string "%'.*Lf%s" and
passes it to snprintf(), in the fr_FR.UTF-8 locale. Solaris 11 OpenIndiana
and Solaris 11 OmniOS have a bug here: when the thousands-separator is
a multibyte character, snprintf() takes only the first byte of it.
This is not a problem on other platforms: A test program (attached)
shows that:
- on Solaris 11.4, the thousands-separator is U+0020 = SPACE, a single-byte
character.
- on glibc, it is U+202F NARROW NO-BREAK SPACE, and snprintf stores
it entirely in the result string.
- on Solaris 11 OpenIndiana / OmniOS, it is U+00A0 NO-BREAK SPACE =
"\xc2\xa0", and snprintf() takes only the first byte.
Later, the padding pass runs mbswidth() on the returned string, and
due to this invalid byte sequence mbswidth() returns -1, and no padding
characters are added.
The fix belongs in Solaris 11 or Gnulib; the numfmt source code should
not need any changes. I'll deal with that; this should not delay the
coreutils release.
Bruno
[openindiana-test-suite.log (text/x-log, attachment)]
[foo.c (text/x-csrc, attachment)]
Reply sent
to
Bruno Haible <bruno <at> clisp.org>
:
You have taken responsibility.
(Fri, 11 Apr 2025 22:23:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
Bruno Haible <bruno <at> clisp.org>
:
bug acknowledged by developer.
(Fri, 11 Apr 2025 22:23:02 GMT)
Full text and
rfc822 format available.
Message #10 received at 77622-done <at> debbugs.gnu.org (full text, mbox):
> On Solaris OpenIndiana, there is one test failure:
> FAIL: tests/misc/numfmt
>
> Specifically, the tests lcl-fmt-2, lcl-fmt-3 fail. See the attached log file.
>
> I can easily reproduce it:
> $ LC_ALL=fr_FR.UTF-8 src/numfmt --format "--%'10f--" 50000
> --50�000--
> whereas
> $ LC_ALL=en_US.UTF-8 src/numfmt --format "--%'10f--" 50000
> -- 50,000--
Fixed in gnulib, through
https://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=commitdiff;h=f7a63a906ed956838b3e6d5545092cef264e0b6e
Information forwarded
to
bug-coreutils <at> gnu.org
:
bug#77622
; Package
coreutils
.
(Sat, 12 Apr 2025 10:26:02 GMT)
Full text and
rfc822 format available.
Message #13 received at 77622 <at> debbugs.gnu.org (full text, mbox):
On 11/04/2025 23:22, Bruno Haible via GNU coreutils Bug Reports wrote:
>> On Solaris OpenIndiana, there is one test failure:
>> FAIL: tests/misc/numfmt
>>
>> Specifically, the tests lcl-fmt-2, lcl-fmt-3 fail. See the attached log file.
>>
>> I can easily reproduce it:
>> $ LC_ALL=fr_FR.UTF-8 src/numfmt --format "--%'10f--" 50000
>> --50�000--
>> whereas
>> $ LC_ALL=en_US.UTF-8 src/numfmt --format "--%'10f--" 50000
>> -- 50,000--
>
> Fixed in gnulib, through
> https://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=commitdiff;h=f7a63a906ed956838b3e6d5545092cef264e0b6e
Wow, a 2910 line patch.
thank you!
Pádraig
This bug report was last modified today.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.