NO

Author Topic: _tprintf difference using _UNICODE  (Read 8401 times)

iancasey

  • Guest
_tprintf difference using _UNICODE
« on: February 14, 2008, 11:53:09 PM »
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
« Last Edit: February 15, 2008, 12:26:34 AM by iancasey »

JohnF

  • Guest
Re: _tprintf difference using _UNICODE
« Reply #1 on: February 15, 2008, 08:28:56 AM »
When using UNICODE you need to have %ls format specifier.

John

iancasey

  • Guest
Re: _tprintf difference using _UNICODE
« Reply #2 on: February 15, 2008, 07:06:07 PM »
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