Hi.
I'm trying to decode string from unicode (utf-16) to windows-1251.
On microsoft doc said that "GetString(Byte[]) When overridden in a derived class, decodes all the bytes in the specified byte array into a string." but i gets only first symbol of b variable, or any symbol when specifying an index number.
What am I doing wrong?
I'm trying to decode string from unicode (utf-16) to windows-1251.
C#:
string b = "Ó382ÍÎ76";
Encoding win1251 = Encoding.GetEncoding(1251);
byte[] uniByte = Encoding.Unicode.GetBytes(b);
textBox1.Text = win1251.GetString(uniByte);
What am I doing wrong?