in reply to Re: UTF-8 text files with Byte Order Mark
in thread UTF-8 text files with Byte Order Mark

Actually, I would be a little surprised to find a BOM in combination with UTF-8
Yeah, you don't usually see utf-8 files with a BOM. Nevertheless, it's perfectly valid

update: note that the utf-8 BOM consists of three bytes: "EF BB BF"

  • Comment on Re^2: UTF-8 text files with Byte Order Mark

Replies are listed 'Best First'.
Re^3: UTF-8 text files with Byte Order Mark
by muba (Priest) on Feb 13, 2007 at 20:03 UTC

    The test file seems to match that three-byte BOM indeed.

    I'm happy to know you don't usualy see utf-8 files with a BOM, but as pointed out below, some programs still store it, such as Notepad. One of my users seems to have a utf-8 file with a BOM too.