Possible Duplicate:
How to Output Unicode Strings on the Windows Console
I try to output UTF-16 charachters to console in win32console application, but i cannot change the encoding of output stream, I try to use SetConsoleOutputCP() function but when i use next code for testing
std::wcout << GetConsoleOutputCP() << std::endl;//output 866
SetConsoleOutputCP(CP_WINUNICODE); //if i set CP_UTF8 it works
std::wcout << GetConsoleOutputCP() << std::endl;//output 866
I get the same result (866) for two cases. When I'm try to set CP_UTF8
it works correct but I need UTF-16, why my attempt is failed and how can I set output stream's encoding to UTF-16?