string <-> wstring123456789101112#include <boost/locale.hpp>int TestChangeWS(){ // string -> wstring std::wstring wname = boost::locale::conv::to_utf<wchar_t>(name, "GBK"); std::wcout << TEXT("wname:\t") << wname << TEXT("\n"); // wstring -> string std::string sname = boost::locale::conv::from_utf(wname, "GBK"); std::cout << "sname:\t" << sname << "\n"; return 0;}