Title: Unknown character set in php_error.log
Last modified: August 19, 2016

---

# Unknown character set in php_error.log

 *  [kbking](https://wordpress.org/support/users/kbking/)
 * (@kbking)
 * [18 years, 5 months ago](https://wordpress.org/support/topic/unknown-character-set/)
 * 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

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Thread Starter [kbking](https://wordpress.org/support/users/kbking/)
 * (@kbking)
 * [18 years, 5 months ago](https://wordpress.org/support/topic/unknown-character-set/#post-679620)
 * 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!
 *  Thread Starter [kbking](https://wordpress.org/support/users/kbking/)
 * (@kbking)
 * [18 years, 5 months ago](https://wordpress.org/support/topic/unknown-character-set/#post-679621)
 * 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?

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Unknown character set in php_error.log’ is closed to new replies.

## Tags

 * [character](https://wordpress.org/support/topic-tag/character/)
 * [language](https://wordpress.org/support/topic-tag/language/)
 * [set](https://wordpress.org/support/topic-tag/set/)
 * [unknown](https://wordpress.org/support/topic-tag/unknown/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 1 participant
 * Last reply from: [kbking](https://wordpress.org/support/users/kbking/)
 * Last activity: [18 years, 5 months ago](https://wordpress.org/support/topic/unknown-character-set/#post-679621)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
