I have problem with unicode functions under my Ubuntu 10.10 linux. Lot of unicode functions doesn’t work correctly. When I try following simple code:
#include <wchar.h>
int main(int argc, char *argv[])
{
wprintf(L"test %s %s %s\n",L"one",L"two",L"three");
return 0;
}
and compile using g++ (gcc version 4.4.5 Ubuntu/Linaro 4.4.4.-14ubuntu5) a have following results:
test o t t
instead of expected:
test one two three
Also other functions for working with unicode strings doesnt work correctly. Lot of my code I developing under MS Windows and this is my first linux programming atempts.
(Same bug appears on two linux machines where I tested this fragment)
Thank you for any advice.
You want
%lsinstead, as given in thewprintf(3)man page.