openbsd-ports/converters/p5-Encode-IMAPUTF7/patches/patch-lib_Encode_IMAPUTF7_pm
simon 7201680f25 import p5-Encode-IMAPUTF7
IMAP mailbox names are encoded in a modified UTF7 when names contain
international characters outside of the printable ASCII range.  The
modified UTF-7 encoding is defined in RFC2060 (section 5.1.3).
2009-01-25 23:02:40 +00:00

18 lines
601 B
Plaintext

$OpenBSD: patch-lib_Encode_IMAPUTF7_pm,v 1.1.1.1 2009/01/25 23:02:40 simon Exp $
Fix for problem under Perl 5.10 found at
http://rt.cpan.org/Public/Bug/Display.html?id=40827
--- lib/Encode/IMAPUTF7.pm.orig Sun Jan 25 23:45:28 2009
+++ lib/Encode/IMAPUTF7.pm Sun Jan 25 23:46:20 2009
@@ -36,7 +36,8 @@ sub encode($$;$){
if ($1 eq "&"){
$bytes .= "&-";
}else{
- my $base64 = encode_base64($e_utf16->encode($1), '');
+ my $s = $1;
+ my $base64 = encode_base64($e_utf16->encode($s), '');
$base64 =~ s/=+$//;
$base64 =~ s/\//,/g;
$bytes .= "&$base64-";