Index: wp-includes/wp-db.php
===================================================================
--- wp-includes/wp-db.php	(revision 6736)
+++ wp-includes/wp-db.php	(working copy)
@@ -81,7 +81,12 @@
 
 		$this->ready = true;
 
-		if ( !empty($this->charset) && version_compare(mysql_get_server_info($this->dbh), '4.1.0', '>=') )
+		if ( function_exists('mysql_set_charset') ) {
+			$this->charset = ( empty( $this->charset ) ) ? 'utf8' : $this->charset;
+			mysql_set_charset($this->charset, $this->dbh);
+		}
+
+		elseif ( !empty($this->charset) && version_compare(mysql_get_server_info($this->dbh), '4.1.0', '>=') )
  			$this->query("SET NAMES '$this->charset'");
 
 		$this->select($dbname);
@@ -138,14 +143,10 @@
 	 * @return string query safe string
 	 */
 	function escape($string) {
-		return addslashes( $string );
-		// Disable rest for now, causing problems
-		/*
-		if( !$this->dbh || version_compare( phpversion(), '4.3.0' ) == '-1' )
-			return mysql_escape_string( $string );
-		else
+		if ( 'utf8' == $this->charset ) 
 			return mysql_real_escape_string( $string, $this->dbh );
-		*/
+		else 
+			return addslashes( $string );
 	}
 
 	/**

