Changeset 11379 for lang/perl/Jcode

Show
Ignore:
Timestamp:
05/11/08 03:16:17 (7 months ago)
Author:
dankogai
Message:

Version 2.07

Location:
lang/perl/Jcode/trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • lang/perl/Jcode/trunk/Changes

    r11377 r11379  
    11# 
    2 # $Id: Changes,v 2.6 2006/07/02 07:56:06 dankogai Exp dankogai $ 
     2# $Id: Changes,v 2.7 2008/05/10 18:15:19 dankogai Exp dankogai $ 
    33# 
    4 $Revision: 2.6 $ $Date: 2006/07/02 07:56:06 $ 
     4$Revision: 2.7 $ $Date: 2008/05/10 18:15:19 $ 
     5! Jcode.pm 
     6  fixed: mime_encode doesn't work properly 
     7  patch appled but the default value of $lf is reverted. 
     8  http://rt.cpan.org/Ticket/Display.html?id=29049 
     9 
     102.06 2006/07/02 07:56:06 
    511! Jcode.pm t/regex.t t/tr.t 
    612  Security fix by Hanabusa-san that prevents options from being eval'ed. 
  • lang/perl/Jcode/trunk/Jcode.pm

    r11377 r11379  
    11# 
    2 # $Id: Jcode.pm,v 2.6 2006/07/02 07:56:06 dankogai Exp dankogai $ 
     2# $Id: Jcode.pm,v 2.7 2008/05/10 18:15:19 dankogai Exp dankogai $ 
    33# 
    44 
     
    99use vars qw($RCSID $VERSION $DEBUG); 
    1010 
    11 $RCSID = q$Id: Jcode.pm,v 2.6 2006/07/02 07:56:06 dankogai Exp dankogai $; 
    12 $VERSION = do { my @r = (q$Revision: 2.6 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r }; 
     11$RCSID = q$Id: Jcode.pm,v 2.7 2008/05/10 18:15:19 dankogai Exp dankogai $; 
     12$VERSION = do { my @r = (q$Revision: 2.7 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r }; 
    1313$DEBUG = 0; 
    1414 
     
    427427sub _add_encoded_word { 
    428428    require MIME::Base64; 
    429     my($str, $line, $bpl) = @_; 
     429    my($str, $line, $lf, $bpl) = @_; 
    430430    my $result = ''; 
    431431    while (length($str)) { 
     
    434434        if (length($line) + 22 + 
    435435            ($target =~ /^(?:$RE{EUC_0212}|$RE{EUC_C})/o) * 8 > $bpl) { 
    436             $line =~ s/[ \t\n\r]*$/\n/; 
     436            $line =~ s/[ \t\n\r]*$/$lf/eo; 
    437437            $result .= $line; 
    438438            $line = ' '; 
     
    484484            } 
    485485        } else { 
    486             $header = _add_encoded_word($word, $header, $bpl); 
     486            $header = _add_encoded_word($word, $header, $lf, $bpl); 
    487487        } 
    488488        $header =~ /(?:.*\n)*(.*)/;