
{filelink=19568}
using System;
using System.Text;
class ExampleDecodage
{
public static void Main()
{
Byte[] octets = new Byte[] { 69,120,101,109,112,108,101,32,69,110,99,111,100,97,103,101,32,
115,117,114,32,109,101,115,101,120,101,109,112,108,101,115,46,99
,111,109 };
UTF8Encoding encUTF8 = new UTF8Encoding();
int nbrChar = encUTF8.GetCharCount(octets, 2, 17);
Char[] caract = new Char[nbrChar];
int nbrCharDecodé = encUTF8.GetChars(octets, 2, 17, caract, 0);
Console.WriteLine(nbrCharDecodé);
foreach (Char c in caract)
{
Console.Write("[{0}]", c);
}
}
}