WordPress.org

Ready to get started?Download WordPress

Forums

Twenty Eleven
[resolved] Character Encoding error when validating my site. (4 posts)

  1. square_eyes
    Member
    Posted 10 months ago #

    Character Encoding error when validating my site.

    The character encoding specified in the HTTP header (utf-8) is different from the value in the <meta> element ( utf-8)

    Where is the encoding sourced from in the theme?

    I have found

    <meta charset="
    <?php bloginfo( 'charset' ); ?>
    " />

    But where does this come from? Somewhere there is an extra space being added.

    Many thanks!

  2. Siobhan Bamber (siobhyb)
    Forum Mod.
    Posted 10 months ago #

    Can you double-check that the snippet you found is all on one line, with no space between the first quotation and the starting PHP declaration. As follows:

    <meta charset="<?php bloginfo( 'charset' ); ?>" />

  3. square_eyes
    Member
    Posted 10 months ago #

    OK that was it. Seems so simple now. But I really just copied what was in the modified theme file. My partner or I may have inadvertently split that line.

    Sometimes code validators/beautifiers split out lines and I don't know when to accept or reject the changes:)

    In any case, I can see what was wrong and fixed it. Thanks!

  4. Siobhan Bamber (siobhyb)
    Forum Mod.
    Posted 10 months ago #

    Ah, the simple things always seem to cause the most frustration. :) Glad you've fixed it now. :)

Reply

You must log in to post.

About this Theme

About this Topic