Forums

Charset pbr in dashboard (ISO vs UTF-8) (5 posts)

  1. Sulquendi
    Member
    Posted 2 years ago #

    Hello,

    I'm running the latest WP version (2.8.4 actually) on my website, along with a vBulletin board that i run for years now.

    vBulletin uses ISO-8859-1 and since i needed to have WP & vBulletin working together, i had to switch WP charset to ISO-8859-1.

    (I've got ~140K posts on my boards so i decided to change WP charset instead of having to convert the boards to UTF-8.)

    To end this quick sum up of the situation, EVERYTHING went OK and my WP installation is working in ISO-8859-1 (well... almost everything.)

    I've got some charset conversion issues in the dashboard display, as you can see in this screenshot :
    http://img17.imageshack.us/i/charset.jpg/

    I suppose it's because of the AJAX features (jQuery ?) that loads the several dashboard widgets. When it comes to load some bits of my ISO translation, something goes wrong.

    I also suppose that i've got to alter some parts of WP code to encode/decode the AJAX output.

    Question is : where to perform theses modifications ?

    Thx for your help :)

  2. Sulquendi
    Member
    Posted 2 years ago #

    As i was performing further investigations, i've found out that 'index-extra.php' is sending the datas with the following http header :
    Content-Type: text/html; charset=UTF-8

    I've also tried to force ISO-8859-1 with the following line in the file:
    @header('Content-Type: ' . get_option('html_type') . '; charset=ISO-8859-1');

    But it keeps on sending UTF-8, wtf ?!

  3. germchaos
    Member
    Posted 2 years ago #

    SELECT *
    FROM wp_options
    WHERE option_name = 'blog_charset'

    in this row is defined the charset... maybe this information is helpfull... edit cell "option_value" to your preference.

    this solve my problem.. sya!

  4. Sulquendi
    Member
    Posted 2 years ago #

    Hello germchaos, thanks for your answer! Unfortunately my 'blog_charset' is already set to ISO-8859-1, so the problem doesn't come from there.

    As a quick fix, i've edited the wp_DashboardWidgetName_output() functions in the wordpress code and added a few utf8_encode() functions to get the index_extra.php output properly in UTF8 (since i couldn't find a way to make it use ISO-8859-1 like any other pages on my website and in my WP install)

  5. iampm
    Member
    Posted 2 years ago #

    Hello, I'm having the same problem as previously cited by Sulquendi. I'm looking for a solution that would be nicer than adding few utf8_encode() in the wp_DashboardWidgetName_output() functions ... Can anyone help?

Topic Closed

This topic has been closed to new replies.

About this Topic