Bug#879204: MIME::Words::encode_mimewords: splits in the middle of a multibyte character, invalid MIME
gregor herrmann
gregoa at debian.org
Fri Oct 20 13:20:28 UTC 2017
On Fri, 20 Oct 2017 14:48:51 +0200, Thorsten Glaser wrote:
> tglase at helpdesk:~$ 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";'
> Re:=?UTF-8?Q?=20Bildungsurlaub=20f=C3?= =?UTF-8?Q?=83=C2=BCr=20CCC?=-Fahrt?=?UTF-8?Q?=20?=[THD#1424195]
>
> Expected output is something along the lines of:
>
> tglase at tglase:~ $ php
> <?php
> mb_internal_encoding('UTF-8');
> echo mb_encode_mimeheader('Subject: Re: Bildungsurlaub für CCC-Fahrt? [THD#1424195]', 'UTF-8', 'Q', "\015\012") . "\n";
> Subject: Re: Bildungsurlaub =?UTF-8?Q?f=C3=BCr=20CCC-Fahrt=3F=20=5BTHD=23?=
> =?UTF-8?Q?=31=34=32=34=31=39=35=5D?=
The output is different with 5.508-1:
% 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";'
Re: Bildungsurlaub =?UTF-8?Q?f=C3=83=C2=BCr=20?=CCC-Fahrt? [THD#1424195]
Looking at the upstream Changes:
5.504 2013-01-30 Dianne Skoll <dfs at roaringpenguin.com>
[..]
* Fix long-standing bug in encode_mimewords that can
break multibyte-encodings (eg, utf-8)
https://rt.cpan.org/Public/Bug/Display.html?id=5462
Cheers,
gregor
--
.''`. https://info.comodo.priv.at/ - Debian Developer https://www.debian.org
: :' : OpenPGP fingerprint D1E1 316E 93A7 60A8 104D 85FA BB3A 6801 8649 AA06
`. `' Member of VIBE!AT & SPI, fellow of the Free Software Foundation Europe
`- NP: Anouar Brahem: Toi qui sais
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 963 bytes
Desc: Digital Signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-perl-maintainers/attachments/20171020/d6abd314/attachment.sig>
More information about the pkg-perl-maintainers
mailing list