Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > 990dbf0cedc5e7df39833eaf1ef25821 > files > 3

squirrelmail-1.4.8-5.el5_7.13.src.rpm

diff -ruNp squirrelmail-1.4.6.org/functions/mime.php squirrelmail-1.4.6/functions/mime.php
--- squirrelmail-1.4.6.org/functions/mime.php	2006-06-29 08:23:58.000000000 +0900
+++ squirrelmail-1.4.6/functions/mime.php	2006-06-29 08:34:26.000000000 +0900
@@ -353,8 +353,20 @@ function formatBody($imap_stream, $messa
                 $body = charset_decode($body_message->header->getParameter('charset'),$body,false,true);
             }
         } else {
-            translateText($body, $wrap_at,
-                    $body_message->header->getParameter('charset'));
+	    if($squirrelmail_language != 'ja_JP'){
+		    translateText($body, $wrap_at,
+				  $body_message->header->getParameter('charset'));
+	    } else {
+		    if($body_message->header->encoding == 'base64' ||
+		       $body_message->header->encoding == 'quoted-printable' ||
+		       $body_message->header->encoding == 'quoted_printable'){
+			    translateText($body, $wrap_at, $default_charset);
+		    } else {
+			    // it may never call here.
+			    translateText($body, $wrap_at,
+					  $body_message->header->getParameter('charset'));
+		    }
+	    }
         }
 
         // if this is the clean display (i.e. printer friendly), stop here.