[Mimedefang] MIME::Entity not handling Charset => 'utf-8' correctly?

Philip Prindeville philipp_subx at redfish-solutions.com
Wed Feb 20 21:20:56 EST 2013

Awesome, that worked!

I'm wondering if in MIME::Body we should take:

sub as_string {
 my $self = shift;
 my $str = '';
 my $fh = IO::File->new(\$str, '>:') or croak("Cannot open in-memory file: $!");
 return $str;

and have:

 return Encode::decode($charset, $str);

instead, but I'm not sure how we'd retrieve $charset…  It would need to be stored into MIME::Body which isn't currently the case.



On Feb 20, 2013, at 6:21 PM, David F. Skoll <dfs at roaringpenguin.com> wrote:

> Try putting "use Encode;" near the top of your test file and replacing
> utf8::upgrade($string);
> with:
> $string = Encode::decode('utf-8', $string);

More information about the MIMEDefang mailing list