Aan
Aan

Reputation: 12920

Convert wchar_t* type to managed UTF-8 string

How can I convert wchar_t* type to a managed UTF-8 string in C++/CLI?

Upvotes: 0

Views: 847

Answers (1)

Yahia
Yahia

Reputation: 70369

Assuming you mean System::String by "managed UTF-8 string" (although managed strings are UTF16) use

String ^systemstring = gcnew String(YoutrWCharString);

For samples and details see How to: Convert Between Various String Types on MSDN.

Upvotes: 2

Related Questions