Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- UTF8Encoding enc = new UTF8Encoding(true/*include Byte Order Mark*/);
- byte[] data = enc.GetBytes("a");
- // data has length 1.
- // I expected the BOM to be included. What's up?
- UTF8Encoding enc = new UTF8Encoding(true);
- byte[] data = enc.GetBytes("a");
- byte[] combo = enc.GetPreamble().Concat(data).ToArray();
- byte[] preamble = enc.GetPreamble();
Add Comment
Please, Sign In to add comment