• Resolved southbound

    (@southbound)


    I get the following error when I run this plugin:

    INFO: Non-printable characters were found in the header.php file. You may want to check this file for errors.
    Line 1: ???<!DOCTYPE html>

    The bytes before my doctype is a byte order mark (BOM). I think Theme-Check is in error to report on the BOM. Even though it’s not necessary in UTF-8, it’s legal, common and useful. Theme-Check shouldn’t say anything about it.

    https://www.ads-software.com/plugins/theme-check/

Viewing 1 replies (of 1 total)
  • Plugin Author Samuel Wood (Otto)

    (@otto42)

    www.ads-software.com Admin

    That is an INFO message, and as such can be ignored if you think it’s valid.

    That said, a BOM is not particularly valid in HTML, and it’s downright wrong in PHP code. If you had a BOM at the top of the functions.php file, for example, then PHP would interpret it as output, and since the functions.php file loads before headers are sent, it would cause a “headers already sent” error on most configurations.

    I recommend removing the BOM from all text files in a theme.

    More info:
    https://www.w3.org/International/questions/qa-byte-order-mark.en.php

Viewing 1 replies (of 1 total)
  • The topic ‘UTF-8 with BOM’ is closed to new replies.