WordPress.org

Ready to get started?Download WordPress

Forums

Encoding set to UTF-8 but reading as iso-8859-1 (8 posts)

  1. jonahlee
    Member
    Posted 6 years ago #

  2. MikeLesser
    Member
    Posted 6 years ago #

    Jonah

    Did you ever get a solution for this? I have a similar problem. My blog is UTF-8 but the charset tag returns 8859.

  3. jonahlee
    Member
    Posted 6 years ago #

    No, I don't have any answers on this one, and have even gone in and converted my databases to UTF-8, but the problem still occurs.

  4. SimonJ
    Member
    Posted 6 years ago #

    The WPLANG settings in wp-config.php has nothing to do with the character encoding. The only purpose of that setting is to set the "lang" in the header and choose an mo file for the translation.

    What theme are you using ? Did you modify the header.php in any way ?

    Normally, you have a header.php in your theme folder... Open it...

    You should have a line in the <head> section where it is written :

    <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />

    The charset=<?php bloginfo('charset') reads your encoding setting in the database and generate the output in the html page (the source you see).

    Maybe the charset is "forced" there... If it's written charset=iso-8859-1, then WordPress is not asked to retreive the settings you made in the admin panel... You should have <?php bloginfo('charset') to do so...

    S.

  5. SimonJ
    Member
    Posted 6 years ago #

    Hello again jonahlee.

    When I look at your source, the charset is defined in UTF-8...

    <meta http-equiv="content-type" content="text/html; charset=utf-8" />

    ... So I guess your problem is solved (?)

    By the way, you have this statement twice in your head section... It's not the source of your problem, but only one is enough :-)

    S.

  6. MikeLesser
    Member
    Posted 6 years ago #

    Simon -

    I have the same problem, but my charset is being read via the tag. As far as I know, the blog is utf-8. The blog is brand-new, set up with utf-8 in the config & the database.

    Here's my source:

    <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />

    I'm confused - where is the 8859-1 coming from? thx

  7. moshu
    Member
    Posted 6 years ago #

    I can't think of anything else than what is described here:
    http://www.askapache.com/htaccess/setting-charset-in-htaccess.html
    meaning the server might send a conflicting encoding information... (read the article, it might give you some ideas: what to ask/check with the host)

  8. jonahlee
    Member
    Posted 6 years ago #

    Thanks for the help, that led me to it. Still seem to have other issues with my header, and am going to start delving into those to try and clean it up. Thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic