The plugin generated 3 characters of unexpected output during activation

What is BOM?

The UTF-8 byte order mark or simply UTF-8 BOM is a series of bytes that helps the reader to understand the encoding of the current document.

These 3 bytes are:

EF BB BF

Or simply the Unicode character : U+FEFF

In a plugin file encoded as BOM, these bytes will be output when the template is called, causing early output in header, that triggers a common error:

The plugin generated X characters of unexpected output during
activation.

This can also happen to theme’s files. Since using BOM for UTF-8 files is not recommended by Unicode Standards, you can save your templates as UTF-8 without BOM.

You will also notice that every UTF-8 file that is encoded under BOM has at least a size of 3 bytes, even if it’s empty.