unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Jani Nikula <jani@nikula.org>
To: David Bremner <david@tethera.net>,
	Franz Fellner <alpine.art.de@gmail.com>,
	notmuch@notmuchmail.org
Subject: Re: UTF-8 in mail headers (namely FROM) sent by bugzilla
Date: Fri, 26 Jul 2013 12:16:21 +0200	[thread overview]
Message-ID: <87d2q5wrre.fsf@nikula.org> (raw)
In-Reply-To: <87y58xv71x.fsf@zancas.localnet>

On Tue, 23 Jul 2013, David Bremner <david@tethera.net> wrote:
> Franz Fellner <alpine.art.de@gmail.com> writes:
>
>>
>> OK, thx. So every app needs to get patched to display those strings
>> properly? Any chance this could be done directly in libnotmuch?  I
>> grepped for "2047" inside te "emacs" subtree, but found nothing (had
>> the hope for a comment for the workaround). Would be interesting to
>> see how this is done, so I can at least try to create a patch (though
>> my ruby is quite basic).
>
> In general notmuch relies on libgmime for rfc2047 parsing.  I'm not sure
> of all the details now, but some of the filtering does happen in the
> CLI, not the lib.  You could start by looking at
> gmime-filter-headers.[ch] in the top directory.

I'm experiencing a similar problem with the Subject: headers in bugzilla
mail. Per RFC 2047,

    Ordinary ASCII text and 'encoded-word's may appear together in the
    same header field.  However, an 'encoded-word' that appears in a
    header field defined as '*text' MUST be separated from any adjacent
    'encoded-word' or 'text' by 'linear-white-space'.

In the problematic mails, the encoded-word begins immediately after
preceding text, i.e. without linear-white-space. Manually adding that
space in the message file makes the subject display as expected.

The decoding is done in the cli using g_mime_message_get_subject(). I'm
not sure if there's much that can be done about it within notmuch.

BR,
Jani.

  reply	other threads:[~2013-07-26 10:16 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-23  8:55 UTF-8 in mail headers (namely FROM) sent by bugzilla Franz Fellner
2013-07-23  9:30 ` Eric Abrahamsen
2013-07-23 10:55   ` Franz Fellner
2013-07-23 11:39     ` David Bremner
2013-07-26 10:16       ` Jani Nikula [this message]
2013-07-29 19:46         ` Daniel Kahn Gillmor
2013-07-29 19:46       ` Daniel Kahn Gillmor
2013-07-24  6:44     ` Eric Abrahamsen
2013-10-05 10:43 ` Jani Nikula
2013-10-05 13:38   ` Daniel Kahn Gillmor
     [not found] <289881190.1977918.1376058260231.JavaMail.root@sz0152a.westchester.pa.mail.comcast.net>
2013-08-09 18:04 ` Jani Nikula
2013-08-09 18:38   ` Jeffrey Stedfast

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87d2q5wrre.fsf@nikula.org \
    --to=jani@nikula.org \
    --cc=alpine.art.de@gmail.com \
    --cc=david@tethera.net \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).