Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

6
  • 1
    Sorry, your example does not appear to work. Try it with string "\x00EF\x00BB\x00BF<xml/>" under .NET 4. Commented Feb 4, 2011 at 18:14
  • Didn't completely understand the question I've had trouble with the standard BOM and didnt even recognise the \x00EF\x00BB\x00BF madness you had to deal with Commented Dec 14, 2011 at 13:34
  • 3
    Isn't '\uFEFF' the BOM for UTF16, rather than UTF8? Commented May 18, 2013 at 19:06
  • 1
    You know, you're right there, I've never had trouble with the UTF8 BOM (which is on reflection what the question asked - that is indeed the UTF8 one) the UTF16 BOM is what I was having trouble with at the time. Commented Jul 2, 2013 at 12:04
  • 1
    @Cocowalla The corresponding bytes are FEFF in big-endian UTF16, yes, but the preamble character is the same in all encodings. Commented Jan 2, 2017 at 9:20