[bug #20074] extra space in subject

2007-06-04 11:17:32


                 Summary: extra space in subject
                 Project: MHonArc
            Submitted by: egmont
            Submitted on: Monday 06/04/2007 at 18:17
                Category: Mail Parsing
                Severity: 3 - Normal
              Item Group: Incorrect Behavior
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
        Operating System: Linux
            Perl Version: 5.8.8
       Component Version: 2.6.16
           Fixed Release: 



I've just upgraded from an ancient sympa to 5.3 and this one runs mhonarc
with different arguments. The relevant part is:
utf-8; MHonArc::UTF8::to_utf8; MHonArc/

I've just noticed a bug that we haven't faced before: in plenty of subjects
an extra space or tab character is inserted somewhere in the middle of a
word. For example a mail with subject "Blah Bláh Foobar" that was correctly
displayed so far might now be displayed as "Blah Bláh Foob ar".

This happens when mail clients encode the long accented subject using
=?x?Q?...?= or =?x?B?...?= notation. In this case they can wrap into a new
physical line everywhere, even in the middle of a word. For example, the raw
mailbox file might look like this:
Subject: =?utf-8?Q?Blah_Bl=C3=A1h_Foob?=

In this case mhonarc preserves the space or tab at the beginning of the new
line as if it was part of the subject, though it should drop it. If there is
actually a space then mail clients explicitely mention it within one of the
=?.?.?...?= blocks.

Ugly but forks-for-me patch attached, I hope it doesn't have negative side
effects. I haven't read and understood all the details of rfc 1522 and
friends, this patch just happens to work for this situation. I bet you'll
have a better solution :-)


File Attachments:

Date: Monday 06/04/2007 at 18:17  Name:
mhonarc-2.6.16-header-extra-space.patch  Size: 2kB   By: egmont



Reply to this item at:


  Message sent via/by Savannah

To sign-off this list, send email to majordomo(_at_)mhonarc(_dot_)org with the

<Prev in Thread] Current Thread [Next in Thread>