You need to use std::wcout
and use UTF-16 by encoding as hex bytes (as Mark answers), but I can't guarantee that any of your characters will display correctly on Windows (before Vista?) because the Windows console was never really intended for this sort of thing. You can use wcout
with Visual Studio and maybe Cygwin, but I don't think MinGW supports it. Make sure to use wide character literals: L"string"
.
Alternatively, you can use the preprocessor to supply the correct definitions of constants for each platform. I imagine that there will be at most three—ASCII on older platforms, UTF-8 on the more modern, and UTF-16 (with wcout
) on newer Windows.