My simple code has no trouble with Japanese characters when outputting, but for some reason it doesn't take input properly, is it lacking something?
int main()
{
_setmode(_fileno(stdout), _O_U16TEXT);
SetConsoleCP(CP_UTF8);
std::wstring s = L"こんにちは, 世界!\nHello, World!";
std::wcout << s << endl;
std::wstring test;
getline(wcin, test);
std::wstring test2 = test;
std::wcout << test2 << endl;
std::wstring test3 = test2;
std::wcout << test3 << endl;
std::wcout << "Press ENTER to exit.";
std::wcout << "\n";
cin.get();
return 0;
}