Index: wp-includes/wp-db.php
===================================================================
--- wp-includes/wp-db.php	(revision 21466)
+++ wp-includes/wp-db.php	(working copy)
@@ -545,6 +545,14 @@
 	 * @param string   $collate The collation (optional)
 	 */
 	function set_charset($dbh, $charset = null, $collate = null) {
+		if ( $this->has_cap( 'utf8mb4' ) ) {
+			if ( 'utf8' == $this->charset )
+				$this->charset = 'utf8mb4';
+
+			if ( strpos( $this->charset, 'utf8_' ) === 0 )
+				$this->charset = str_replace( 'utf8_', 'utf8mb4_', $this->charset );
+		}
+
 		if ( !isset($charset) )
 			$charset = $this->charset;
 		if ( !isset($collate) )
@@ -1575,6 +1583,8 @@
 				return version_compare( $version, '4.1', '>=' );
 			case 'set_charset' :
 				return version_compare($version, '5.0.7', '>=');
+			case 'utf8mb4':
+				return version_compare($version, '5.5.3', '>=');
 		};
 
 		return false;
