Hi, Jamie.
Japanese E-mail is garbled to read by using sendmail/view_mail.cgi.
This is a patch for the garbled problem.
I hope that Jamie will include this patch with next release.
&eucconv(&html_escape is garbled, but &html_escape(&eucconv is not garbled.
Other problem,
The heaer is encoded euc-jp by eucconv, but the body is not encoded.
The line is 127.
There are same preblems in postfix, qmail, etc modules.
Thanks.
==
--- view_mail.cgi.default 2003-11-23 17:55:23.000000000 +0900
+++ view_mail.cgi 2003-11-23 18:59:39.000000000 +0900
@@ -94,32 +94,32 @@
# Show all the headers
if ($mail->{'fromline'}) {
print "<tr> <td><b>$text{'mail_rfc'}</b></td>",
- "<td>",&eucconv(&html_escape($mail->{'fromline'})),
+ "<td>",&html_escape(&eucconv($mail->{'fromline'})),
"</td> </tr>\n";
}
foreach $h (@{$mail->{'headers'}}) {
print "<tr> <td><b>$h->[0]:</b></td> ",
- "<td>",&eucconv(&html_escape(&decode_mimewords($h->[1]))),
+ "<td>",&html_escape(&eucconv(&decode_mimewords($h->[1]))),
"</td> </tr>\n";
}
}
else {
# Just show the most useful headers
print "<tr> <td><b>$text{'mail_from'}</b></td> ",
- "<td>",&eucconv(&html_escape(&decode_mimewords(
+ "<td>",&html_escape(&eucconv(&decode_mimewords(
$mail->{'header'}->{'from'}))),"</td> </tr>\n";
print "<tr> <td><b>$text{'mail_to'}</b></td> ",
- "<td>",&eucconv(&html_escape(&decode_mimewords(
+ "<td>",&html_escape(&eucconv(&decode_mimewords(
$mail->{'header'}->{'to'}))),"</td> </tr>\n";
print "<tr> <td><b>$text{'mail_cc'}</b></td> ",
- "<td>",&eucconv(&html_escape(&decode_mimewords(
+ "<td>",&html_escape(&eucconv(&decode_mimewords(
$mail->{'header'}->{'cc'}))),"</td> </tr>\n"
if ($mail->{'header'}->{'cc'});
print "<tr> <td><b>$text{'mail_date'}</b></td> ",
- "<td>",&eucconv(&html_escape($mail->{'header'}->{'date'})),
+ "<td>",&html_escape(&eucconv($mail->{'header'}->{'date'})),
"</td> </tr>\n";
print "<tr> <td><b>$text{'mail_subject'}</b></td> ",
- "<td>",&eucconv(&html_escape(&decode_mimewords(
+ "<td>",&html_escape(&eucconv(&decode_mimewords(
$mail->{'header'}->{'subject'}))),"</td> </tr>\n";
}
print "</table></td></tr></table><p>\n";
@@ -127,7 +127,7 @@
# Show body attachment
if ($body) {
print "<table width=100% border=1><tr><td $cb><pre>\n";
- foreach $l (&wrap_lines($body->{'data'}, $config{'wrap_width'})) {
+ foreach $l (&wrap_lines(&eucconv($body->{'data'}), $config{'wrap_width'})) {
print &link_urls_and_escape($l),"\n";
}
print "</pre></td></tr></table><p>\n";
|