Index: wp-includes/compat.php
===================================================================
--- wp-includes/compat.php	(revision 7135)
+++ wp-includes/compat.php	(working copy)
@@ -77,4 +77,23 @@
 }
 endif;
 
+if ( ! function_exists('mb_strcut') ):
+	function mb_strcut( $str, $start, $length=null, $encoding=null ) {
+		return _mb_strcut($str, $start, $length, $encoding);
+	}
+endif;
+
+function _mb_strcut( $str, $start, $length=null, $encoding=null ) {
+	// the solution below, works only for utf-8, so in case of a different
+	// charset, just use built-in substr
+	$charset = get_option( 'blog_charset' );
+	if ( !in_array( $charset, array('utf8', 'utf-8', 'UTF8', 'UTF-8') ) ) {
+		return is_null( $length )? substr( $str, $start ) : substr( $str, $start, $length);
+	}
+	// use the regex unicode support to separate the UTF-8 characters into an array
+	preg_match_all( '/./us', $str, $match );
+	$chars = is_null( $length )? array_slice( $match[0], $start ) : array_slice( $match[0], $start, $length );
+	return implode( '', $chars );
+}
+
 ?>
Index: wp-includes/comment.php
===================================================================
--- wp-includes/comment.php	(revision 7135)
+++ wp-includes/comment.php	(working copy)
@@ -1046,11 +1046,7 @@
 	else
 		$excerpt = apply_filters('the_excerpt', $post->post_excerpt);
 	$excerpt = str_replace(']]>', ']]&gt;', $excerpt);
-	$excerpt = strip_tags($excerpt);
-	if ( function_exists('mb_strcut') ) // For international trackbacks
-    	$excerpt = mb_strcut($excerpt, 0, 252, get_option('blog_charset')) . '...';
-	else
-		$excerpt = substr($excerpt, 0, 252) . '...';
+	$excerpt = wp_html_excerpt($excerpt, 252) . '...';
 
 	$post_title = apply_filters('the_title', $post->post_title);
 	$post_title = strip_tags($post_title);
Index: wp-includes/formatting.php
===================================================================
--- wp-includes/formatting.php	(revision 7135)
+++ wp-includes/formatting.php	(working copy)
@@ -1370,4 +1370,26 @@
 	return $result . substr($pattern, 2);
 }
 
+/**
+ * Safely extracts not more than the first $count characters from html string
+ *
+ * UTF-8, tags and entities safe prefix extraction. Entities inside will be
+ * counted as one character. As a side effect, all entities will be converted to
+ * their decimal form.
+ *
+ * @param integer $str String to get the excerpt from
+ * @param integer $count Maximum number of visible characters to take
+ * @eaturn string the excerpt
+ */
+function wp_html_excerpt( $str, $count ) {
+	$str = strip_tags( $str );
+	$str = html_entity_decode( $str, ENT_QUOTES);
+	$str = mb_strcut( $str, 0, $count );
+	// remove part of an entity at the end
+	$str = preg_replace( '/&[^;\s]{0,6}$/', '', $str );
+	// we decoded some entities we should put back
+	$str = wp_specialchars( $str );
+	return $str;
+}
+
 ?>
Index: wp-trackback.php
===================================================================
--- wp-trackback.php	(revision 7135)
+++ wp-trackback.php	(working copy)
@@ -72,15 +72,8 @@
 	if ( !pings_open($tb_id) )
 		trackback_response(1, 'Sorry, trackbacks are closed for this item.');
 
-	$title =  wp_specialchars( strip_tags( $title ) );
-	$excerpt = strip_tags($excerpt);
-	if ( function_exists('mb_strcut') ) { // For international trackbacks
-		$excerpt = mb_strcut($excerpt, 0, 252, get_option('blog_charset')) . '...';
-		$title = mb_strcut($title, 0, 250, get_option('blog_charset')) . '...';
-	} else {
-		$excerpt = (strlen($excerpt) > 255) ? substr($excerpt, 0, 252) . '...' : $excerpt;
-		$title = (strlen($title) > 250) ? substr($title, 0, 250) . '...' : $title;
-	}
+	$title =  wp_html_excerpt( $title, 250 ).'...';
+	$excerpt = wp_html_excerpt( $excerpt, 252 ).'...';
 
 	$comment_post_ID = (int) $tb_id;
 	$comment_author = $blog_name;
@@ -100,4 +93,4 @@
 	do_action('trackback_post', $wpdb->insert_id);
 	trackback_response(0);
 }
-?>
\ No newline at end of file
+?>
Index: wp-settings.php
===================================================================
--- wp-settings.php	(revision 7135)
+++ wp-settings.php	(working copy)
@@ -15,6 +15,7 @@
 if ( function_exists('memory_get_usage') && ( (int) @ini_get('memory_limit') < abs(intval(WP_MEMORY_LIMIT)) ) )
 	@ini_set('memory_limit', WP_MEMORY_LIMIT);
 
+
 /**
  * wp_unregister_GLOBALS() - Turn register globals off
  *
@@ -350,6 +351,15 @@
 
 require (ABSPATH . WPINC . '/pluggable.php');
 
+/*
+ * In most cases the default internal encoding is latin1, which is of no use,
+ * since we want to use the mb_ functions for utf-8 strings
+ */
+if ( function_exists('mb_internal_encoding') )
+	mb_internal_encoding( get_option( 'blog_charset' ) );
+
+
+
 if ( defined('WP_CACHE') && function_exists('wp_cache_postload') )
 	wp_cache_postload();
 
Index: wp-admin/includes/dashboard.php
===================================================================
--- wp-admin/includes/dashboard.php	(revision 7135)
+++ wp-admin/includes/dashboard.php	(working copy)
@@ -335,10 +335,7 @@
 				$content = $item['atom_content'];
 			else
 				$content = __( 'something' );
-			$content = strip_tags( $content );
-			if ( 50 < strlen($content) )
-				$content = substr($content, 0, 50) . ' ...';
-			$content = wp_specialchars( $content );
+			$content = wp_html_excerpt($content, 50) . ' ...';
 			if ( $link )
 				$text = _c( '%1$s linked here <a href="%2$s">saying</a>, "%3$s"|feed_display' );
 			else
