November 23rd, 2013, 05:44 PM
From UTF8 sting to byte array and vice versa
I have a byte array (first_arr) I changed it to UTF8 string like this
Then I re-transferred it to byte array like this
string utf_str = Encoding.UTF8.GetString(first_arr);
But the resulted array (second_arr) is different from the native one (first_arr) Why does that happen?
byte  second_arr = Encoding.UTF8.GetBytes(utf_str);
November 24th, 2013, 03:06 PM
Re: From UTF8 sting to byte array and vice versa
Probably the first array was of a different encoding, try using ASCII or Default
Tags for this Thread
Click Here to Expand Forum to Full Width
This is a CodeGuru survey question.