WordPress.org

Ready to get started?Download WordPress

Forums

Unknown character set in php_error.log (3 posts)

  1. kbking
    Member
    Posted 6 years ago #

    Hi.
    I have spent the last two weeks adding content to my wp v.2.3.2 cms. All seems to work, that is, I don´t get any error messages on my screen. But accidentally I checked my php_error_log and there I see hundreds if not thousands of error msg. They are all the same, this msg:

    [11-Jan-2008 22:45:38] WordPress database error Unknown character set: 'ISO-8859-1' for query SET NAMES 'ISO-8859-1'

    I have added one plugin called Language Switcher and have followed the instructions to the T.

    Anyone knows what needs to be done here?

    TIA
    /kbking

  2. kbking
    Member
    Posted 6 years ago #

    Maybe I should have mentioned that I am a novice when it comes to coding.

    I have my wp locally on my development server using WAMP5 v. 1.7.2.

    I can see that the error message originates from line #87 in wp-db.php, which reads:

    $this->query("SET NAMES '$this->charset'");

    Since I can´t use the utf-8 encoding because it messes up the special characters that I need for my native language, ie. å,ä,ö, I have changed to ISO-8859-1. I made the change in Admin->Options->Read.

    I can see that many if not all of the wp core files have utf-8 encoding, should I change in every instance to the setting I have in Admin->Options->Read, that is to ISO-8859-1?

    I really want to get rid of this error message, please advice!

  3. kbking
    Member
    Posted 6 years ago #

    Hello again!

    Now I noticed that without the lines #86 and #87 which reads:

    if ( !empty($this->charset) && version_compare(mysql_get_server_info(), '4.1.0', '>=') )
     			$this->query("SET NAMES '$this->charset'");

    the error message disappeared!

    My question: If I comment out these two lines, will it cause problems elsewhere in the WP-application?

Topic Closed

This topic has been closed to new replies.

About this Topic