Subject: | MIME::Entity->build barfs with non-utf8 input for Perl >= 5.18 |
Date: | Fri, 19 Jun 2015 14:35:49 +0200 |
To: | bug-MIME-tools [...] rt.cpan.org |
From: | Peter Mottram <peter [...] sysnix.com> |
PerlIO bug fixed in 5.18:
http://blogs.perl.org/users/tony_cook/2013/02/perl-io-on-scalars.html
https://rt.perl.org/Public/Bug/Display.html?id=109828
Causes breakage:
$ perl -MMIME::Entity -e 'MIME::Entity->build( Data => "\x{1f4a9}" )->print'
Content-Type: text/plain
Content-Disposition: inline
Content-Transfer-Encoding: binary
MIME-Version: 1.0
X-Mailer: MIME-tools 5.506 (Entity 5.506)
open body: Invalid argument at
/home/apm/perl5/perlbrew/perls/perl-5.20.2/lib/site_perl/5.20.2/MIME/Entity.pm
line 1878.
Earlier Perls most likely would end up with garbage so this needs fixing
for everyone.
I'm afraid my unicode skills are not up to creating a patch for this one.
Regards
PeteM