Critical Character issue bug report

Hiya folks,
(we crazy about this issue for a one week)

We think the problem is server-based so we tested on 4 datacenter.
but we've understand our problem from php version.

When we were using php 5.1 everything working good.but we upgrade/carried our web server php 5.2 or 5.3 .We get a very very critical character issue.

When we looked phpmyadmin everything ok,but when looked network, every blog have character issue.(worked for the one week for this issue.)

solution: in db.php file line 171,

if ( $this->has_cap( 'collation' ) && !empty( $this->charset ) ) {
			if ( function_exists( 'mysql_set_charset' ) ) {
				mysql_set_charset( $this->charset, $this->dbhglobal );
				$this->real_escape = true;
			} else {
				$query = $this->prepare( 'SET NAMES %s', $this->charset );
				if ( ! empty( $this->collate ) )
					$query .= $this->prepare( ' COLLATE %s', $this->collate );
				$this->query( $query );
			}
		}

remove and add

mysql_query('SET NAMES UTF8');
		 mysql_query("SET CHARACTER SET utf8");
         mysql_query('SET COLLATION_CONNECTION=utf8_general_ci');

Our problem is resolved in this way.

PHP 5.1 is not supported by some sections of the condition above (so working good) but php 5.2 and 5.3 support this condition (so get a error.)

Thank you for reading.
Cheers,