i understand that a byte array containing information encoded in unicode can (obviously!) not be decoded using, for example, ascii; the result is data "garbage". what i don't understand is why even a temporary conversion fails, or in other words, why the data "garbage" can not be reconverted back to unicode. let me make you an example:
byte[] b1 = byte array containing some unicode data
string s = Encoding.ASCII.GetString(b1);
byte[] b2 = Encoding.ASCII.GetBytes(s);
why is b2 not = b1?
i guess i'm missing something basic here about how encoding and byte-arrays work.
byte[] b1 = byte array containing some unicode data
string s = Encoding.ASCII.GetString(b1);
byte[] b2 = Encoding.ASCII.GetBytes(s);
why is b2 not = b1?
i guess i'm missing something basic here about how encoding and byte-arrays work.