Unicode to Ascii

  • Thread starter Thread starter Guest
  • Start date Start date
Hi Joachim!
How do I convert from unicode to ascii string in C++/CLI?

int main()
{
array<System::Byte> ^ascii =
System::Text::Encoding::ASCII->GetBytes("Hello World");
}

Greetings
Jochen
 
Jochen Kalmbach said:
Hi Joachim!


int main()
{
array<System::Byte> ^ascii =
System::Text::Encoding::ASCII->GetBytes("Hello World");
}

While I have no doubt that Encoding::ASCII works, it seems awfully
inefficient compared to just calling WideCharToMultibyte.
 
Back
Top