[Mimedefang] utf-8 issue?

Dianne Skoll dfs at roaringpenguin.com
Wed Dec 13 16:39:09 EST 2017

On Wed, 13 Dec 2017 16:28:58 -0500
"Bill Cole" <mdlist-20140424 at billmail.scconsult.com> wrote:

> Unfortunately, I tested a bit more and found that bug is still extant
> in 5.509, when tested with the one-liner in that bug report.

That "bug" is a WONTFIX.  You can NOT feed MIME::Entity->build()
data with raw characters > 0xFF.  It doesn't make sense because
MIME messages are alway 8-bit messages; you need to encode everything
as UTF-8 first before passing to MIME::Entity->build().  I should
comment on the ticket.  The correct way to build the entity
would be:

use Encode;
use MIME::Entity;

my $data = "\x{1f4a9}";
my $e = MIME::Entity->build(Data => Encode::encode('UTF-8', $data, Encode::FB_CROAK));

So the question is... how on Earth are characters > 0xFF getting passed
to MIME::Entity->build() from within mimedefang.pl?

I will close the bug on CPAN.



More information about the MIMEDefang mailing list