为了将std::wstring
转换为UTF-8,我使用以下代码:
std::wstring my_wide_string = L"my_sqlite_db.db";
std::wstring_convert<std::codecvt_utf8<wchar_t> > myconv;
myconv.to_bytes( my_wide_string.c_str() );
现在,我需要进行后向转换,即UTF-8到std::wstring
。
切换转换器的正确方法是什么?
答案 0 :(得分:1)