Sophie

Sophie

distrib > Mageia > 7 > i586 > media > core-updates-src > by-pkgid > fc6f60ad5dc13a448a13eb625263b62c > files > 38

squirrelmail-1.4.23-0.svn20201220_0200.1.mga7.src.rpm

diff -up squirrelmail-1.4.13/functions/mime.php.BAD squirrelmail-1.4.13/functions/mime.php
--- squirrelmail-1.4.13/functions/mime.php.BAD	2008-09-05 12:24:10.000000000 -0400
+++ squirrelmail-1.4.13/functions/mime.php	2008-09-05 12:24:36.000000000 -0400
@@ -361,8 +361,20 @@ function formatBody($imap_stream, $messa
                 $body = magicHTML($body, $id, $message, $mailbox);
             }
         } 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.