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);
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
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"
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