Forums

[resolved] Weird characters inserted before doctype (3 posts)

  1. nadodi
    Member
    Posted 4 years ago #

    There are some weird characters that are being inserted before doctype declaration. Strangely it happens only on the home page and not on any other pages/posts. Firefox ignores it and displays the page properly. IE however inserts a line above the page, breaking the design in the process.

    To see the code, go to http://www.appropriateit.org/, and change character encoding to western iso-8859.

    I have combed through all the template headers with no luck in locating these offending characters. Any other ideas?

    TIA.

  2. nadodi
    Member
    Posted 4 years ago #

    Those were the dreaded UTF Byte Order Marks (BOM).

    To inspect your file for BOM (note you have to do each include file separately):
    http://people.w3.org/rishida/utils/bomtester/

    To delete it using Notepad++:
    Open the php file using Notepad++ ... now, you won't even see the BOM marks there, BUT it can remove them. Do this. Your file is most likely UTF-8. Go to Format, and select "Encode in ANSI". Then go to Format again, and select UTF-8 without BOM. Save your file. (from Joomlapolis)

  3. moshu
    Member
    Posted 4 years ago #

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags