--- /dev/null
+Return-Path: <jani@nikula.org>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by olra.theworths.org (Postfix) with ESMTP id 1B94E431FAF\r
+ for <notmuch@notmuchmail.org>; Fri, 26 Jul 2013 03:16:38 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+ tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+ by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id p-HSk9R8iZ0o for <notmuch@notmuchmail.org>;\r
+ Fri, 26 Jul 2013 03:16:30 -0700 (PDT)\r
+Received: from mail-we0-f170.google.com (mail-we0-f170.google.com\r
+ [74.125.82.170]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+ (No client certificate requested)\r
+ by olra.theworths.org (Postfix) with ESMTPS id 9D6B9431FAE\r
+ for <notmuch@notmuchmail.org>; Fri, 26 Jul 2013 03:16:30 -0700 (PDT)\r
+Received: by mail-we0-f170.google.com with SMTP id w60so1708236wes.29\r
+ for <notmuch@notmuchmail.org>; Fri, 26 Jul 2013 03:16:28 -0700 (PDT)\r
+X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
+ d=google.com; s=20120113;\r
+ h=from:to:subject:in-reply-to:references:user-agent:date:message-id\r
+ :mime-version:content-type:x-gm-message-state;\r
+ bh=CLwDSrMRVNzv0didh7VStheMYFLoQtswHRk+bC5WZVc=;\r
+ b=CAC60za2kOcTGaAEIkiBRr8d2KN6z1hXJrLxQW5DEL1LnydJhth/SS6Fjjt6RO/8ec\r
+ Rj521i6PRvxs3MeKOFFMkMGbhCPsxyaxu+r6GE0NvzsDljjXinJtUHbUqdpjmCbWUQDF\r
+ WsZhc8wokuw7sGcCuW9xp0UBYDVtYtSRPou0LKniOFD256B3O4mkFYmbm27/kKrOJ8ja\r
+ orVzU56R+gU5VaYeUriaUgeXFv2SxZV0ZmZDOmYSHbg1mEAmG5Df8WlwBk5xjd5hD9Us\r
+ 2gKp+/XlP0jLKaE059+SO3FtnhzBHDk9DDoU++Ad39P9MHy6644hJ6SmsP6olbXOQDL/\r
+ /bsQ==\r
+X-Received: by 10.180.38.45 with SMTP id d13mr5117651wik.62.1374833786960;\r
+ Fri, 26 Jul 2013 03:16:26 -0700 (PDT)\r
+Received: from localhost ([2001:4b98:dc0:43:216:3eff:fe1b:25f3])\r
+ by mx.google.com with ESMTPSA id u9sm3616142wif.6.2013.07.26.03.16.24\r
+ for <multiple recipients>\r
+ (version=TLSv1.1 cipher=RC4-SHA bits=128/128);\r
+ Fri, 26 Jul 2013 03:16:25 -0700 (PDT)\r
+From: Jani Nikula <jani@nikula.org>\r
+To: David Bremner <david@tethera.net>,\r
+ Franz Fellner <alpine.art.de@gmail.com>, notmuch@notmuchmail.org\r
+Subject: Re: UTF-8 in mail headers (namely FROM) sent by bugzilla\r
+In-Reply-To: <87y58xv71x.fsf@zancas.localnet>\r
+References: <08cb1dcd-c5db-4e33-8b09-7730cb3d59a2@gmail.com>\r
+ <871u6psjwr.fsf@ericabrahamsen.net>\r
+ <5712cc41-d0ce-4ed3-af1c-37cf639dd9c0@gmail.com>\r
+ <87y58xv71x.fsf@zancas.localnet>\r
+User-Agent: Notmuch/0.15.2+177~gb1ba76c (http://notmuchmail.org) Emacs/23.2.1\r
+ (x86_64-pc-linux-gnu)\r
+Date: Fri, 26 Jul 2013 12:16:21 +0200\r
+Message-ID: <87d2q5wrre.fsf@nikula.org>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+X-Gm-Message-State:\r
+ ALoCoQko29M9Ro43HU2VDrllEyIxRDIGbadpeKM5xJcRvqsopQ3n5ZvT06DzGXNoFV+oWOldg6V2\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Fri, 26 Jul 2013 10:16:38 -0000\r
+\r
+On Tue, 23 Jul 2013, David Bremner <david@tethera.net> wrote:\r
+> Franz Fellner <alpine.art.de@gmail.com> writes:\r
+>\r
+>>\r
+>> OK, thx. So every app needs to get patched to display those strings\r
+>> properly? Any chance this could be done directly in libnotmuch? I\r
+>> grepped for "2047" inside te "emacs" subtree, but found nothing (had\r
+>> the hope for a comment for the workaround). Would be interesting to\r
+>> see how this is done, so I can at least try to create a patch (though\r
+>> my ruby is quite basic).\r
+>\r
+> In general notmuch relies on libgmime for rfc2047 parsing. I'm not sure\r
+> of all the details now, but some of the filtering does happen in the\r
+> CLI, not the lib. You could start by looking at\r
+> gmime-filter-headers.[ch] in the top directory.\r
+\r
+I'm experiencing a similar problem with the Subject: headers in bugzilla\r
+mail. Per RFC 2047,\r
+\r
+ Ordinary ASCII text and 'encoded-word's may appear together in the\r
+ same header field. However, an 'encoded-word' that appears in a\r
+ header field defined as '*text' MUST be separated from any adjacent\r
+ 'encoded-word' or 'text' by 'linear-white-space'.\r
+\r
+In the problematic mails, the encoded-word begins immediately after\r
+preceding text, i.e. without linear-white-space. Manually adding that\r
+space in the message file makes the subject display as expected.\r
+\r
+The decoding is done in the cli using g_mime_message_get_subject(). I'm\r
+not sure if there's much that can be done about it within notmuch.\r
+\r
+BR,\r
+Jani.\r