_tprintf difference using _UNICODE

Started by iancasey, February 14, 2008, 11:53:09 PM

Previous topic - Next topic

iancasey

Hi,
I think I may have found a bug in _tprintf and Unicode

  _tprintf("%s%s%s\n",_T("This Took : "), _T("50"), _T(" secs."));
  _tprintf(_T("This Took : 99 secs."));


under
pocc -W1 -Ot -Gd -Go -MT -Ze -Zx -Tx86-coff -D_WIN32_WINNT=0x0400   -DUNICODE -D_UNICODE test.c

the 1st line only produces only the 1st character
2nd line emits the whole line

without -DUNICODE -D_UNICODE in the compile line, then both lines produce the desired results.


Ian

JohnF

When using UNICODE you need to have %ls format specifier.

John

iancasey

Thanks John,
It worked of course.
I've been using PellesC for PPC for 2-3 years and never noticed a difference using the format specifier before.
I am learning there are slight differences between PPC unicode and the desktop version.

Great work Pelles on version 5.00

Regards,
Ian