dimanche 28 août 2016

Alternate method Encoding.Unicode.GetBytes in native C++

Need implement Encoding.Unicode.GetBytes in native C++.

.NET implementation:

Console.WriteLine("codePage number: " + Encoding.Unicode.CodePage.ToString());
Console.Write("string: ");
foreach (var ch in Encoding.Unicode.GetBytes("string"))
    Console.Write(ch.ToString("X") + "-");
Console.WriteLine();
Console.Write("строка: ");
foreach (var ch in Encoding.Unicode.GetBytes("строка"))
    Console.Write(ch.ToString("X") + "-");
Console.ReadLine();

.NET implementation output: screenshot

How implement this method (without use boost, QT, etc..) to C++?

Aucun commentaire:

Enregistrer un commentaire