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.