private static string ByteArrayToString(byte[] characters)
{
string constructedString = Encoding.UTF8.GetString(characters);
constructedString = constructedString.Trim();
MessageBox.Show(((int)constructedString[0]).ToString() + " '" + constructedString.Substring(0, 3) + "'");
return (constructedString);
}
The byte array does contain the Byte-Order-Marker, and the data is an XML.
In 3.5, the message box displays 60 '<?&' --- 60 is the ascii value of <
In 4.0, the message box displays 65279 '<?' --- 65279 is the ascii value of Zero Width No Brake Space
Is this expected?