Bug#879205: MIME::Words::encode_mimewords: double-encodes (produces Mojibake), produces too long lines

Thorsten Glaser tg at mirbsd.de
Fri Oct 20 20:19:42 UTC 2017


gregor herrmann dixit:

>Right, forwarded upstream as
>https://rt.cpan.org/Ticket/Display.html?id=123335


Dianne Skoll dixit:

>Below is my test program:
[…]

Hi, I believe your test program is not correct.

perl -MEncode -MMIME::Words -e 'print MIME::Words::encode_mimewords(Encode::encode("UTF-8", "Re: Bildungsurlaub für CCC-Fahrt? [THD#1424195]"), Charset => "UTF-8", Field => "Subject") . "\n";'

This will do it. Alternatively (semi-tested) with yours:
my $sample = "Re: Bildungsurlaub f\x{FC}r CCC-Fahrt? [THD#1424195]";

You were missing the “f” and “r” there. This is extremely sensitive
to context.

This looks to me as if the old code (with the bug from Debian
#879204) was called, *then* things are re-read and re-encoded.

bye,
//mirabilos
-- 
FWIW, I'm quite impressed with mksh interactively. I thought it was much
*much* more bare bones. But it turns out it beats the living hell out of
ksh93 in that respect. I'd even consider it for my daily use if I hadn't
wasted half my life on my zsh setup. :-) -- Frank Terbeck in #!/bin/mksh



More information about the pkg-perl-maintainers mailing list