Re: Bug: problem decoding some non-ascii characters in subjects
authorJani Nikula <jani@nikula.org>
Sat, 9 Feb 2013 10:06:58 +0000 (12:06 +0200)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:53:31 +0000 (09:53 -0800)
74/9550e6d5accb9007bc1c2fca9ea10278dcf2a7 [new file with mode: 0644]

diff --git a/74/9550e6d5accb9007bc1c2fca9ea10278dcf2a7 b/74/9550e6d5accb9007bc1c2fca9ea10278dcf2a7
new file mode 100644 (file)
index 0000000..e952561
--- /dev/null
@@ -0,0 +1,106 @@
+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 505FE41DB89\r
+       for <notmuch@notmuchmail.org>; Sat,  9 Feb 2013 02:07:07 -0800 (PST)\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 l+RMh3JqqUg7 for <notmuch@notmuchmail.org>;\r
+       Sat,  9 Feb 2013 02:07:06 -0800 (PST)\r
+Received: from mail-la0-f50.google.com (mail-la0-f50.google.com\r
+       [209.85.215.50]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 9F90D41DB87\r
+       for <notmuch@notmuchmail.org>; Sat,  9 Feb 2013 02:07:06 -0800 (PST)\r
+Received: by mail-la0-f50.google.com with SMTP id ec20so4547478lab.37\r
+       for <notmuch@notmuchmail.org>; Sat, 09 Feb 2013 02:07:02 -0800 (PST)\r
+X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
+       d=google.com; s=20120113;\r
+       h=x-received:from:to:subject:in-reply-to:references:user-agent:date\r
+       :message-id:mime-version:content-type:content-transfer-encoding\r
+       :x-gm-message-state;\r
+       bh=2d0FKD0rsAQ8iqqV2C5twH6GTC22+64v7UDR+DhtGtA=;\r
+       b=L/b2u/ye4I4BsMjk1l8R4uFeV7/ilobkJPUED/x1Mpt01xx/JfgbAlFNEPzUo2W03V\r
+       lgxtnYIUwhvWSxDXZXF+by2ee/UE+kKAvUmer0mGVW3vE+Q5EGwqWJ92lLyvSTJ1JhYA\r
+       hT+Ydx7bO00ICmN51WRhknBdgTE0UnQLTGv7Ao11K5FDdKinKy697YBcGR3xv/nE3ta3\r
+       Amgsd0yMMFaa8+c4OCEONWnJOWIzAT11lYmtlbgvVzYewq+N4RYipUO/8TejDn2MgKQz\r
+       mZMUBPJKLnyUXWCmYzxnTHlJeo9Gi80gurRUpGwXCexixBv5DZsaRDn/gGsbcj+M6VCm\r
+       6RZg==\r
+X-Received: by 10.112.9.104 with SMTP id y8mr3332656lba.132.1360404422035;\r
+       Sat, 09 Feb 2013 02:07:02 -0800 (PST)\r
+Received: from localhost (dsl-hkibrasgw4-50df51-27.dhcp.inet.fi.\r
+       [80.223.81.27])\r
+       by mx.google.com with ESMTPS id fh4sm10945726lbb.7.2013.02.09.02.06.59\r
+       (version=TLSv1.2 cipher=RC4-SHA bits=128/128);\r
+       Sat, 09 Feb 2013 02:07:01 -0800 (PST)\r
+From: Jani Nikula <jani@nikula.org>\r
+To: Albin Stjerna <albin.stjerna@gmail.com>, notmuch@notmuchmail.org\r
+Subject: Re: Bug: problem decoding some non-ascii characters in subjects\r
+In-Reply-To: <87pq09eu41.fsf@hecate.student.uu.se>\r
+References: <87txpnds0k.fsf@hecate.student.uu.se> <8738x7kq44.fsf@nikula.org>\r
+       <87pq09eu41.fsf@hecate.student.uu.se>\r
+User-Agent: Notmuch/0.14+255~gff3cc55 (http://notmuchmail.org) Emacs/24.2.1\r
+       (x86_64-pc-linux-gnu)\r
+Date: Sat, 09 Feb 2013 12:06:58 +0200\r
+Message-ID: <87mwvd6bst.fsf@nikula.org>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=utf-8\r
+Content-Transfer-Encoding: quoted-printable\r
+X-Gm-Message-State:\r
+ ALoCoQnf7H6oeQAxJGM8/Qr//6aRqq8gmHuxZcIBYCPEBp5D5TjT5khZrGH1pH95OLh73c+8BkcE\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: Sat, 09 Feb 2013 10:07:07 -0000\r
+\r
+On Sat, 09 Feb 2013, Albin Stjerna <albin.stjerna@gmail.com> wrote:\r
+> Jani Nikula wrote:\r
+>\r
+>> On Fri, 08 Feb 2013, Albin Stjerna <albin.stjerna@gmail.com> wrote:\r
+>> > I've been noticing that notmuch has some problems decoding certain\r
+>> > strangely-encoded non-ascii characters in certain emails. For example,\r
+>> > today I got this: [BIBLIST] Digitaliseringensprojektens skadliga\r
+>> > f=3D?ISO-8859-1?Q?=3DF6rk=3DE4rlek_f=3DF6r_?=3D PDF-formatet (should be\r
+>> > rendered: =C2=BBDigitaliseringsprojektens skadliga f=C3=B6rk=C3=A4rlek=\r
+ f=C3=B6r\r
+>> > PDF-formatet=C2=AB).\r
+>> >\r
+>> > Apparently, some metadata is passed on to help the MUA decode the\r
+>> > string, but notmuch doesn't seem to handle it. Entire emails can of\r
+>> > course be supplied as needed.\r
+>\r
+>> Please copy paste the Subject: header directly from the message file.\r
+>\r
+> The exact Subject: header (from the file, not notmuch) is:\r
+> Subject: [BIBLIST] Digitaliseringensprojektens skadliga f=3D?ISO-8859-1?Q=\r
+?=3DF6rk=3DE4rlek_f=3DF6r_?=3D PDF-formatet\r
+\r
+Is that entirely on one line in the original message file? If not, where\r
+exactly is it split?\r
+\r
+Either way, at a glance, it seems like the encoding is malformed. I\r
+think the encoded-word ("=3D?" charset "?" encoding "?" encoded-text "?=3D")\r
+should be separated by space to make it an atom. [RFC 2047, RFC 2822].\r
+\r
+If you manually move the leading 'f' after the "?Q?" bit, it works as\r
+expected. It looks like the bug is in the sender's user agent.\r
+\r
+\r
+BR,\r
+Jani.\r