How does `_setmode` in Visual Studio's CRT interact with `std::wcout`?
According to "Conventional Wisdom is Wrong", the CRT does a fair bit of work in order to smooth out inconsistencies in the handling of Unicode in the console on Win32 if an appropriate flag is set on stdout
. Howev开发者_运维百科er, I'm not using cstdio
style functions here -- I'm using the iostream
s library. How does _setmode
interact with the standard streams std::wcout
, std::wclog
, and std::wcerr
(if at all?). If it is not usable with the streams, then is it possible/how would one get equivalent behavior?
Answers which work for either VS2008 or VS2010 will work -- I'm not worried about anything earlier than that.
It doesn't, from memory. There was a question I answered a long time ago now where wprintf() would print correctly but wcout<< wouldn't.
精彩评论