GNU bug report logs -
#77622
coreutils-9.6.53-14af8 on Solaris 11 OpenIndiana
Previous Next
Reported by: Bruno Haible <bruno <at> clisp.org>
Date: Tue, 8 Apr 2025 00:39:02 UTC
Severity: normal
Done: Bruno Haible <bruno <at> clisp.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your bug report
#77622: coreutils-9.6.53-14af8 on Solaris 11 OpenIndiana
which was filed against the coreutils package, has been closed.
The explanation is attached below, along with your original report.
If you require more details, please reply to 77622 <at> debbugs.gnu.org.
--
77622: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=77622
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, 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--
Fixed in gnulib, through
https://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=commitdiff;h=f7a63a906ed956838b3e6d5545092cef264e0b6e
[Message part 3 (message/rfc822, inline)]
[Message part 4 (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)]
This bug report was last modified 100 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.