Subject: | Encode::IMAPUTF7 does not work with Perl 5.10 |
Date: | Tue, 11 Nov 2008 14:37:28 +0900 |
To: | bug-Encode-IMAPUTF7 [...] rt.cpan.org |
From: | Osamu MIHARA <osamu.mihara [...] fujixerox.co.jp> |
Hi, Here is a patch to make Encode::IMAPUTF7 work with Perl 5.10. Enjoy!
*** ../5.8.0/Encode/IMAPUTF7.pm Wed Sep 28 23:06:32 2005
--- Encode/IMAPUTF7.pm Tue Nov 11 14:33:52 2008
***************
*** 36,42 ****
if ($1 eq "&"){
$bytes .= "&-";
}else{
! my $base64 = encode_base64($e_utf16->encode($1), '');
$base64 =~ s/=+$//;
$base64 =~ s/\//,/g;
$bytes .= "&$base64-";
--- 36,43 ----
if ($1 eq "&"){
$bytes .= "&-";
}else{
! my $s = $1;
! my $base64 = encode_base64($e_utf16->encode($s), '');
$base64 =~ s/=+$//;
$base64 =~ s/\//,/g;
$bytes .= "&$base64-";