Subject: | mime_encode doesn't work properly |
I tried to fix the following problems.
1. According to RFC1522 as the document mentioned, I'm afraid it would
be better to set $lf as \r\n instead of \n, which could cause some MTA
like qmail working improperly.
2. The optional parameter $lf is not used in the function, although the
document says it is.
--
http://islue.blogspot.com/
Subject: | patch.txt |
Common subdirectories: Jcode-2.06.orig/Jcode and Jcode-2.06/Jcode
diff Jcode-2.06.orig/Jcode.pm Jcode-2.06/Jcode.pm
414c414
< my $lf = shift || "\n";
---
> my $lf = shift || "\r\n";
429c429
< my($str, $line, $bpl) = @_;
---
> my($str, $line, $lf, $bpl) = @_;
436c436
< $line =~ s/[ \t\n\r]*$/\n/;
---
> $line =~ s/[ \t\n\r]*$/$lf/eo;
486c486
< $header = _add_encoded_word($word, $header, $bpl);
---
> $header = _add_encoded_word($word, $header, $lf, $bpl);
727c727
< When $lf is specified, it uses $lf to fold line (default: \n).
---
> When $lf is specified, it uses $lf to fold line (default: \r\n).
Common subdirectories: Jcode-2.06.orig/Unicode and Jcode-2.06/Unicode
Common subdirectories: Jcode-2.06.orig/t and Jcode-2.06/t