Sample:
char[] arrUnicodeSample = new char[] { '\uAAAA', '\uBBBB', '\uCCCC', '\uDFFF' };
string strUnicode = new string(arrUnicodeSample);
{
UnicodeEncoding encUnicode = new UnicodeEncoding ();
byte[] encodedBytes = encUnicode.GetBytes(strUnicode);
String decodedString = encUnicode.GetString(encodedBytes, 0, encodedBytes.Length);
}
You can also use:
- Encoding
- ASCIIEncoding
- UnicodeEncoding
Nessun commento:
Posta un commento