Subject: NetBSD printf(3) doesn't understand the posix thousands' grouping
To: None <>
From: Tobias Nygren <>
List: tech-userlevel
Date: 05/27/2006 02:09:10
I stumbled upon a problem with printf(3) when porting a program.
The following code:

#include <stdio.h>
#include <stdint.h>

int main(void) {
        int32_t x = 12345;
        int64_t y = 12345;
        printf("%i %'i\n", x, x);
        printf("%lld %'lld\n", y, y);

Procudes the output:
$ ./test
12345 'i
12345 'lld

When the expected result would be(C locale):
$ ./test
12345 12345
12345 12345

The single quote flag is defined by posix in

Is there any reason why this is not implemented?

Please cc replies to me.