CC: | 879205 [...] bugs.debian.org, bug-MIME-tools [...] rt.cpan.org |
Subject: | Re: Bug#879205: MIME::Words::encode_mimewords: double-encodes (produces Mojibake), produces too long lines |
Date: | Fri, 20 Oct 2017 20:19:42 +0000 (UTC) |
To: | gregor herrmann <gregoa [...] debian.org>, Dianne Skoll <dfs [...] roaringpenguin.com> |
From: | Thorsten Glaser <tg [...] mirbsd.de> |
gregor herrmann dixit:
Show quoted text
>Right, forwarded upstream as
>https://rt.cpan.org/Ticket/Display.html?id=123335
Dianne Skoll dixit:
Show quoted text>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