Since you are talking about Windows, you are talking about console windows.
Windows console windows are based on Unicode, more specifically UCS-2 (the basic multilingual plane, essentially the original 16-bit Unicode).
Contrary to what was suggested in the other answers, you can no longer do more. results with std::wcout than with std::cout . Standard widescreen streams simply translate to the character encoding of a single byte of the program. By default, Windows uses OEM character encoding (which can be configured using an undocumented registry key).
But you can output Unicode through the console functions of the Windows API.
Note. It is not recommended to install console windows in UTF-8 . Then the command interpreter [cmd.exe] simply silently ignores most commands. At least in Windows XP and earlier.
Me I just installed OEM in Windows ANSI Western (via the mentioned undocumented registry key), and it works for most purposes, but not for Chinese, of course. This is code page 1252. Alternatively, you can do this manually using the chcp 1252 command in each instance of the command interpreter, as well as in other ways.
Cheers and hth.,
source share