C++0x コード変換

C++0x では、 Unicode サポートのための
コード変換クラスが提供されます。


以下のような感じで使うようです

wstring_convert<codecvt_utf8<wchar_t>> myconv;
string mbstring = myconv.to_bytes(L"Hello\n");
cout << mbstring;


N2401 Code Conversion Facets for the Standard C++ Library

C++0x言語拡張まとめ