WordPress

Fix Korean encoding problem (Rendering UTF-8 encoded wordpress MySql DB)

Add line 1038 in wp/wp-include/wp-db.php like this

1029     function db_connect() {
1030 
1031         $this->is_mysql = true;
1032 
1033         if ( WP_DEBUG ) {
1034             $this->dbh = mysql_connect( $this->dbhost, $this->dbuser, $this->dbpassword, true );
1035         } else {
1036             $this->dbh = @mysql_connect( $this->dbhost, $this->dbuser, $this->dbpassword, true );
1037         }
1038         mysql_query("SET NAMES 'utf8'");

Leave a Comment


NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>