I am extracting string from an byte array. The string is a sql script.
String sql = System.Text.Encoding.GetEncoding(1200).GetString(script);
The first character is coming out to be junk(square box in preview). Due to which the whole script is failing. Any idea why this is happening?
I don't want to specifically remove the first character. More interested in knowing why and how can this be avoided.
System.Text.Encoding.GetEncodingandSystem.Text.UTF32Encoding.GetEncoding. I've removed the reference toUTF32Encodingbecause it might confuse people.