摘要: 在VC++的世界里,MS比较鼓励使用_UNICODE,std::wstring。而在Web, XML则提倡用UTF8。当在C++的程序里要保存/读取XML数据,就存在wstring与string之间的转换。C++11里提供方便的转换工具(参照:std::wstring_convert处理UTF8... 阅读全文
posted @ 2013-11-08 23:56 N3verL4nd 阅读(702) 评论(0) 推荐(0)
摘要: #include #include #include #include #include int main(int argc, char *argv[]){ std::wstring str = L"123,我是谁?我爱钓鱼岛!"; std::wstring_convert> conv;... 阅读全文
posted @ 2013-11-08 00:05 N3verL4nd 阅读(2773) 评论(0) 推荐(0)