libc.so.2, printf and russian text == BUG ! Need Help !!!

Hello, All!

We got the next problem using printf as shown below:

printf(“text=%s [Russian Text] text=%sn”, “Hello”, “Hello”);

we got output: “text=Hello [Russian Text] text=%s” !

Last argument was not parsed by printf function, the same behavior for
sprintf function. When we removed the russian text, all works fine. Russian
text is just symbols in range 0x80-0xFF (e.g. 0xC1, 0xC2, 0xC3, 0xC4).

When the same source was builded with libc.so.1 all works fine in all cases.
AFAIK libc.so.1 is GNU libc and libc.so.2 is DinkumWare libc, so DinkumWare
libc fails.

Any suggestion, how to remove the problem ?

With best regards, Mike Gorchak.

Mike Gorchak <mike@malva.ua.remove.this.for.no.spam> wrote:

We got the next problem using printf as shown below:
printf(“text=%s [Russian Text] text=%sn”, “Hello”, “Hello”);
we got output: “text=Hello [Russian Text] text=%s” !
Last argument was not parsed by printf function, the same behavior for
sprintf function. When we removed the russian text, all works fine. Russian
text is just symbols in range 0x80-0xFF (e.g. 0xC1, 0xC2, 0xC3, 0xC4).
When the same source was builded with libc.so.1 all works fine in all cases.
AFAIK libc.so.1 is GNU libc and libc.so.2 is DinkumWare libc, so DinkumWare
libc fails.

Refer to Thread 715 in the qnxrtp.devtools conference for full
discussion of this issue - can use setlocale(LC_CTYPE, “C_TRADITIONAL”);

Hello, John!

JG> Refer to Thread 715 in the qnxrtp.devtools conference for full
JG> discussion of this issue - can use setlocale(LC_CTYPE,
JG> “C_TRADITIONAL”);

Thanks !

With best regards, Mike Gorchak.