[Koha-patches] [PATCH] (bug #2909) fix the attachment base64 encoding

Nahuel ANGELINETTI nahuel.angelinetti at biblibre.com
Mon Jan 12 10:45:53 CET 2009


this patch change the attachment encoding, else if the file is too large, koha throws an error.
This solution was found on koha list in a Joshua's e-mail
---
 opac/opac-sendbasket.pl |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/opac/opac-sendbasket.pl b/opac/opac-sendbasket.pl
index efa4ea5..5e75dbf 100755
--- a/opac/opac-sendbasket.pl
+++ b/opac/opac-sendbasket.pl
@@ -18,6 +18,8 @@
 use strict;
 
 use CGI;
+use Encode qw(encode);
+
 use Mail::Sendmail;
 use MIME::QuotedPrint;
 use MIME::Base64;
@@ -129,7 +131,7 @@ if ( $email_add ) {
     #     # Writing mail
     #     $mail{body} =
     $mail{'content-type'} = "multipart/mixed; boundary=\"$boundary\"";
-    my $isofile = encode_base64($iso2709);
+    my $isofile = encode_base64(encode("UTF-8", $iso2709));
     $boundary = '--' . $boundary;
     $mail{body} = <<END_OF_BODY;
 $boundary
-- 
1.5.6.3




More information about the Koha-patches mailing list