---
 lib/mu-msg-file.c |   23 +++++------------------
 1 file changed, 5 insertions(+), 18 deletions(-)

Index: maildir-utils.git/lib/mu-msg-file.c
===================================================================
--- maildir-utils.git.orig/lib/mu-msg-file.c	2012-08-21 13:57:38.000000000 +0900
+++ maildir-utils.git/lib/mu-msg-file.c	2012-08-21 14:47:06.000000000 +0900
@@ -468,13 +468,6 @@
 {
 	GMimeContentType *ctype;
 	const char* charset;
-	unsigned char *cur;
-
-	/* optimization: if the buffer is plain ascii, no conversion
-	 * is done... */
-	for (cur = (unsigned char*)buffer; *cur && *cur < 0x80; ++cur);
-	if (*cur == '\0')
-		return buffer;
 
 	ctype = g_mime_object_get_content_type (GMIME_OBJECT(part));
 	g_return_val_if_fail (GMIME_IS_CONTENT_TYPE(ctype), NULL);
@@ -484,21 +477,15 @@
 	if (charset) {
 		char *utf8;
 		utf8 = mu_str_convert_to_utf8
-		         (buffer,
-			  g_mime_charset_iconv_name (charset));
+		         (buffer,  g_mime_charset_iconv_name (charset));
 		if (utf8) {
 			g_free (buffer);
 			return utf8;
 		}
-	} else if (g_utf8_validate (buffer, -1, NULL)) {
-		/*  check if the buffer is valid utf8, even if it doesn't
-		 *  say so explicitly... if that is the case, return it as-is */
-
-		/* nothing to do, buffer is already utf8 */
-
-	} else {
-		/* hmmm.... no charset at all, or conversion failed; ugly
-		  *  hack: replace all non-ascii chars with '.' */
+	} else if (!g_utf8_validate (buffer, -1, NULL)) {
+		/* if it's already utf8, nothing to do otherwise: no
+		   charset at all, or conversion failed; ugly * hack:
+		   replace all non-ascii chars with '.' */
 		mu_str_asciify_in_place (buffer);
 	}
 
