Bug#879205: MIME::Words::encode_mimewords: double-encodes (produces Mojibake), produces too long lines
Thorsten Glaser
tg at mirbsd.de
Fri Oct 20 12:56:01 UTC 2017
Package: libmime-tools-perl
Version: 5.508-1
Severity: normal
Perhaps in a misguided attempt to fix #879204, this happens:
(sid-amd64)tglase at tglase:~ $ 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]
Not only decodes this to…
Re: Bildungsurlaub für CCC-Fahrt? [THD#1424195]
… but it’s also too long *and* has no space between the encoded MIME part
and the next word (“CCC-Fahrt?”), which might cause trouble in strict
readers.
As in #879204, expected output is something along these lines:
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?=
Similar to #787512 and #787513 it saddens me it takes PHP to
provide an example of correct output :|
-- System Information:
Debian Release: buster/sid
APT prefers buildd-unstable
APT policy: (500, 'buildd-unstable'), (500, 'unstable')
Architecture: amd64 (x86_64)
Kernel: Linux 4.12.0-1-amd64 (SMP w/8 CPU cores)
Locale: LANG=C, LC_CTYPE=C.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to C.UTF-8), LANGUAGE=C (charmap=UTF-8) (ignored: LC_ALL set to C.UTF-8)
Shell: /bin/sh linked to /bin/lksh
Init: sysvinit (via /sbin/init)
Versions of packages libmime-tools-perl depends on:
ii libconvert-binhex-perl 1.125-1
ii libmailtools-perl 2.18-1
ii perl 5.26.0-8
libmime-tools-perl recommends no packages.
libmime-tools-perl suggests no packages.
-- no debconf information
More information about the pkg-perl-maintainers
mailing list