Package: libmime-lite-perl
Version: 3.030-2
Severity: normal

Hi,
i am seeing an interesting issue where a long utf-8 subject gains a
space at the wrap point - See the attached testcase:

Cluster: Gütersloh Route: Brockweg -> Heidewaldstadion changed
Cluster: Gütersloh Route:  Bielefelder Straße - Rheda -> Bertelsmann 
Hauptverwaltung changed
                          ^

This space gets added - Here are the resulting Header lines from 
libmime-lite-perl:

Subject: Cluster:=?UTF-8?B?IEfDvHRlcnNsb2ggUm91dGU=?=: Brockweg ->
   Heidewaldstadion changed

Subject: Cluster:=?UTF-8?B?IEfDvHRlcnNsb2ggUm91dGU=?=:
  =?UTF-8?B?IEJpZWxlZmVsZGVyIFN0cmHDn2UgLSBSaGVkYSAt?=>
   Bertelsmann Hauptverwaltung changed

The display of the additional space is consistent in mutt and icedove so i 
expect
it to be standard conform interpretation of the mime headers. 

It seems when the line ends with a non encoded word (:) and starts with
an encoded word we take all except the very first space. RFC2047 has an
example of this only using a single space in front of the encoded word
(Page 10, Examples). Duplicate space suppression does only happen
between encoded words, not between unencoded and encoded words.

Flo

#!/usr/bin/perl -w

use strict;
use utf8;
use MIME::Lite;
use Encode;

my @subjects=(
        'Cluster: Gütersloh Route: Brockweg -> Heidewaldstadion changed',
        'Cluster: Gütersloh Route: Bielefelder Straße - Rheda -> Bertelsmann 
Hauptverwaltung changed'
        );

foreach my $subject ( @subjects ) {

        my $msg = MIME::Lite->new(
                From    => 'testc...@zz.de',
                To      => 'flo',
                Subject => encode('MIME-Header', $subject),
                Type    => 'multipart/mixed',
        );

        $msg->attach(
                Type     => "text/plain; charset=UTF-8",
                Data     => "Testcase",
        );

        $msg->send;

}

-- System Information:
Debian Release: 7.6
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.14-0.bpo.2-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages libmime-lite-perl depends on:
ii  libemail-date-format-perl  1.002-1
ii  libmailtools-perl          2.09-1
ii  perl                       5.14.2-21+deb7u1

Versions of packages libmime-lite-perl recommends:
ii  libmime-types-perl  1.35-1

Versions of packages libmime-lite-perl suggests:
ii  postfix [mail-transport-agent]  2.9.6-2

-- no debconf information


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to