Skip Menu |

This queue is for tickets about the MIME-Base64 CPAN distribution.

Report information
The Basics
Id: 13037
Status: resolved
Priority: 0/
Queue: MIME-Base64

People
Owner: Nobody in particular
Requestors: SREZIC [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 3.05
Fixed in: (no value)



Subject: MIME::Base64 on wide characters
The following script: use MIME::Base64; $x = "eujo: \x{20ac}"; warn encode_base64($x); fails with: Wide character in subroutine entry at base64.pl line ... Which is probably reasonable, but I would like to see a comment in the MIME::Base64 documentation, e.g. something like the unicode explanation paragraphs in the Digest::MD5 documentation. Regards, Slaven
From: julian [...] mehnle.net
[SREZIC - Tue May 31 11:02:43 2005]: Show quoted text
> use MIME::Base64; > $x = "eujo: \x{20ac}"; > warn encode_base64($x); > > fails with: > > Wide character in subroutine entry at base64.pl line ...
The same happens with MIME::QuotedPrint: $ perl -e 'use MIME::QuotedPrint; $x = "euro: \x{20ac}"; warn encode_qp($x);' Wide character in subroutine entry at -e line 1. Please amend the documentation!
From: julian [...] mehnle.net
[JMEHNLE - Wed Nov 9 09:48:45 2005]: Show quoted text
> The same happens with MIME::QuotedPrint: [...] > Please amend the documentation!
Oops, I see that the MIME::QuotedPrint documentation already explains the issue, while the MIME::Base64 one doesn't. So just the MIME::Base64 docs have to be amended.
On Wed Nov 09 09:52:04 2005, JMEHNLE wrote: Show quoted text
> [JMEHNLE - Wed Nov 9 09:48:45 2005]:
> > The same happens with MIME::QuotedPrint: [...] > > Please amend the documentation!
> > Oops, I see that the MIME::QuotedPrint documentation already
explains Show quoted text
> the issue, while the MIME::Base64 one doesn't. So just the
MIME::Base64 Show quoted text
> docs have to be amended.
What is resolution? I get error on issuing cli: Show quoted text
>perl -MMIME::Base64 -0777 -ne 'print encode_base64($_)' <"test.pdf" >cliEncoded.txt
Wide character in subroutine entry at -e line 1, <> chunk 1.
From: smithcw [...] ldschurch.org
On Thu Apr 06 11:41:14 2006, guest wrote: Show quoted text
> On Wed Nov 09 09:52:04 2005, JMEHNLE wrote:
> > [JMEHNLE - Wed Nov 9 09:48:45 2005]:
> > > The same happens with MIME::QuotedPrint: [...] > > > Please amend the documentation!
> > > > Oops, I see that the MIME::QuotedPrint documentation already
> explains
> > the issue, while the MIME::Base64 one doesn't. So just the
> MIME::Base64
> > docs have to be amended.
>
I'm trying to decode an email that was pop'd. After writing the body to a disk file using the perl Mail::POP3Client routine $pop->BodyToFile( $fh, 1); It looks all like text. So, I run following command to translate body of mime message back to pdf for reading. perl -MMIME::Base64 -ne 'print decode_base64($_)' <test.txt >test.pdf No error messages, but file size is different from original file poped from email attachment. When pdf file is brought up in browser, there is no data. Charlie 4/6/06
Solution: The encoded test.txt file had to be stripped of all data before the encoded part and after the encoded part. There were part delimeters and header information that had to be stripped after the '$pop->BodyToFile( $fh, $num_mesg );' call. Then following run on test.txt: perl -mstrict -MFile::Slurp -MMIME::Base64 -we 'my $b64 = read_file("test.txt");write_file("test.pdf", decode_base64($b64));' This worked great. Charlie