How a wchar_t
is output depends on the locale. The default
locale ("C"
) generally doesn't accept anything but ASCII
(Unicode code points 0x20...0x7E, plus a few control
characters.)
Any time a program handles text, the very first statement in
main
should be:
std::locale::global( std::locale( "" ) );
If the program uses any of the standard stream objects, the code should also imbue them with the global locale, before any input or output.