12345678910111213
... ofstream fout; /// O/P file ... fout << "raw string : " << R"(hello!)" << endl; fout << "UTF-8 string : " << u8"hello!" << endl; fout << "UTF-16 string : " << u"hello!" << endl; fout << "UTF-32 string : " << U"hello!" << endl; fout << "wchar_t string : " << L"hello!" << endl; fout << u8"Danish vowels: \u00E6 \u00F8 \u00E5" << endl;
raw string : hello! UTF-8 string : hello! UTF-16 string : 0x46e0a8 UTF-32 string : 0x46e0c8 wchar_t string : 0x46e0a8 Danish vowels: æ ø å
cout << u8"Danish vowels: \u00E6 \u00F8 \u00E5" << endl;
std::wcout