For example this set of character in the Code::Blocks IDE "燼うぬむ味厩" becomes printed as "辯シ縺・〓繧蜻ウ蜴ゥ" in the cmd.
In Visual Studio 2017 the symbols print correctly, but I'd prefer to continue working in Code::Blocks if possible.
#include <iostream>
#include <stdio.h>
#include <cwchar>
#include <windows.h>
int main()
{
system("chcp 932 > nul");
cout << "燼うぬむ味厩" << endl;
return 0;
}
I am aware of wcout but when I use that no text gets printed at all in the cmd. Given that my 6 symbols become interpreted as 12 symbols in total, it seems I need to hard-enable wide characters but so far I have failed in doing so.
Additional notes:
- File encoded in UTF-8, my program refuses to accept UTF-16 in any shape or form
- My Japanese-compatible cmd font is MS Gothic
- OS is Windows 8.1
- Visual Studio printed the text correctly whether I used cout or wcout
Thanks in advance for any suggestions on how to proceed.