On Fri, 20 Oct 2017 14:48:51 +0200, Thorsten Glaser wrote:

> tglase@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@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 <[email protected]>
[..]
        * 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

Attachment: signature.asc
Description: Digital Signature

Reply via email to