(s)printf width and utf-8 (s)printf width and utf-8 monkhandle (Programmer) (OP) 5 Feb 09 07:17 Is this proper behaviour of printf family functions:CODEprintf("'%4s'","€");output:CODE' €'Shouldn't output be CODE' €' ? It seems as if all bytes (3 for euro symbol) were counted as visible field width. RE: (s)printf width and utf-8 xwb (Programmer) 5 Feb 09 08:13 The Euro symbol isn't one of the 127 ASCII characters. It is a multibyte character. You have a choice of using mulitbyte or wide characters. With wide characters, it would beCODEwsprintf (L"%4s", L"€"); RE: (s)printf width and utf-8 monkhandle (Programmer) (OP) 5 Feb 09 08:34 That doesn't work, but:CODEwprintf(L"'%4S'",L"€");outputs:CODE' EUR':DProbably locales are not set properly. But still, why € symbol is output correctly with printf then ?