bug#69951: coreutils: printf formatting bug for nb_NO and nn_NO locales

2024-03-23 Thread Thomas Dreibholz
Hi, indeed, the issue seems to be in libc. I can reproduce the problem with a simple C program: #include #include #include int main(int argc, char** argv) {    setlocale (LC_ALL, "");    struct lconv* loc = localeconv();    printf("Thousands Separator: <%s>\n", loc->thousands_sep);   

bug#69951: coreutils: printf formatting bug for nb_NO and nn_NO locales

2024-03-23 Thread Thomas Dreibholz
Hi, some further debugging of a hexdump output of printf, i.e.: #!/bin/bash for l in de_DE en_US nb_NO nn_NO ; do    echo "LC_NUMERIC=$l.UTF-8"    for n in 1 100 1000 1 10 100 1000 ; do   LC_NUMERIC=$l.UTF-8 /usr/bin/printf "<%'10d>" $n | hexdump -C    done done The output

bug#69951: coreutils: printf formatting bug for nb_NO and nn_NO locales

2024-03-23 Thread Pádraig Brady
tag 69951 notabug close 69951 stop On 22/03/2024 20:22, Thomas Dreibholz wrote: Hi, I just discovered a printf bug for at least the nb_NO and nn_NO locales when printing numbers with thousands separator. To reproduce: #!/bin/bash for l in de_DE nb_NO ; do    echo "LC_NUMERIC=$l.UTF-8"   

bug#69951: coreutils: printf formatting bug for nb_NO and nn_NO locales

2024-03-22 Thread Thomas Dreibholz
Hi, I just discovered a printf bug for at least the nb_NO and nn_NO locales when printing numbers with thousands separator. To reproduce: #!/bin/bash for l in de_DE en_US nb_NO ; do    echo "LC_NUMERIC=$l.UTF-8"    for n in 1 100 1000 1 10 100 1000 ; do