How do I print UTF-8 from c++ console application on Windows
问题 For a C++ console application compiled with Visual Studio 2008 on English Windows (XP,Vista or 7). Is it possible to print out to the console and correctly display UTF-8 encoded Japanese using cout or wcout? 回答1: The Windows console uses the OEM code page by default to display output. To change the code page to Unicode enter chcp 65001 in the console, or try to change the code page programmatically with SetConsoleOutputCP. Note that you probably have to change the font of the console to one