0

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

1
  • 1
    Do you mean managed UTF-16 string? Because that's the encoding System.String uses. Commented Oct 30, 2011 at 19:34

1 Answer 1

2

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.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.