标签: string unicode c++-cli wchar-t
如何在C ++ / CLI中将wchar_t*类型转换为托管UTF-8字符串?
wchar_t*
UTF-8
答案 0 :(得分:2)
假设你的意思是System::String“托管的UTF-8字符串”(尽管托管字符串是UTF16),请使用
System::String
String ^systemstring = gcnew String(YoutrWCharString);
有关示例和详细信息,请参阅How to: Convert Between Various String Types on MSDN。