In Windows, the only way to get Unicode characters (above 0x007F) to display on the console is to use WriteConsoleW(). Your console's font also needs to contain glyphs for the Unicode characters you're attempting to print.
Code:
#define _CRT_SECURE_NO_WARNINGS
#include <windows.h>
#include <iostream>
#include <locale>
#include <mbctype.h>
using namespace std;
#define SOURCE_IN_CP932
// If using VC++, VS 2005 was the first to work with Unicode source code
#if !defined(SOURCE_IN_CP932) && defined(_MSC_VER) && (_MSC_VER < 1400)
# error "Forget it! Time to upgrade"
#endif
#if defined(SOURCE_IN_CP932) && defined(__GNUC__)
# error "Stick with UTF8 source with MinGW"
#endif
int main()
{
wchar_t wmsg[32];
size_t len;
#ifdef SOURCE_IN_CP932
const char msg[] = "こんにちは\n"; // save source file in CP 932
cout << "sizeof(msg) = " << sizeof(msg) << endl;
// convert CP 932 -> Unicode (UTF16LE on Windows)
setlocale(LC_CTYPE, ".932");
len = mbstowcs(wmsg, msg, sizeof(msg)/sizeof(*msg));
#else
// source already saved as Unicode, just copy the characters
wcscpy(wmsg, L"こんにちは\n"); // save source file as Unicoode
len = wcslen(wmsg);
#endif
if (wmsg[0] != 0x3053)
{
cerr << "Bad conversion detected, first character not U+3053" << endl;
#ifdef SOURCE_IN_CP932
cerr << "Source code must be saved under CP 932." << endl;
#else
cerr << "Source code must be saved using a Unicode encoding." << endl;
#endif
return 1;
}//if
DWORD written;
if (!WriteConsoleW(GetStdHandle(STD_OUTPUT_HANDLE),
wmsg, (DWORD)len,
&written, 0))
cerr << "WriteConsole failed, le = " << GetLastError() << endl;
return 0;
}//main
gg