From: David Edmondson Date: Tue, 3 May 2016 10:28:15 +0000 (+0100) Subject: Re: [PATCH v1 1/2] emacs: Observe the charset of MIME parts when reading them. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=c7b13982ad6051dd52382c14c94f1e4fd90d1321;p=notmuch-archives.git Re: [PATCH v1 1/2] emacs: Observe the charset of MIME parts when reading them. --- diff --git a/6a/aea24b9a4e6354a810106b483e9d9bca3a48ff b/6a/aea24b9a4e6354a810106b483e9d9bca3a48ff new file mode 100644 index 000000000..e27240f09 --- /dev/null +++ b/6a/aea24b9a4e6354a810106b483e9d9bca3a48ff @@ -0,0 +1,103 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by arlo.cworth.org (Postfix) with ESMTP id 92A086DE00F5 + for ; Tue, 3 May 2016 03:28:28 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at cworth.org +X-Spam-Flag: NO +X-Spam-Score: -0.185 +X-Spam-Level: +X-Spam-Status: No, score=-0.185 tagged_above=-999 required=5 + tests=[AWL=-0.118, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, + RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, + RCVD_IN_MSPIKE_WL=-0.01, SPF_NEUTRAL=0.652, UNPARSEABLE_RELAY=0.001] + autolearn=disabled +Received: from arlo.cworth.org ([127.0.0.1]) + by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id E_ghINMwMZbU for ; + Tue, 3 May 2016 03:28:19 -0700 (PDT) +Received: from mail-wm0-f52.google.com (mail-wm0-f52.google.com + [74.125.82.52]) by arlo.cworth.org (Postfix) with ESMTPS id 679A46DE00CE for + ; Tue, 3 May 2016 03:28:19 -0700 (PDT) +Received: by mail-wm0-f52.google.com with SMTP id a17so30561623wme.0 + for ; Tue, 03 May 2016 03:28:19 -0700 (PDT) +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=dme-org.20150623.gappssmtp.com; s=20150623; + h=to:subject:in-reply-to:references:from:date:message-id:mime-version; + bh=44rp5rV/jE5sc0G3Orm4ePHyRcZ8a+kJe4dXrucmKtU=; + b=axOuh4otVcojPFkDgQfJmAGEsceNAQiiwyo1EkAxVj5N4hegclWStM4HnRYYlDaToq + M64IBEkvVvChWXNe5xtfsMBwndwCLjEzxsYYbwXZKIomQw2XtO+u1e0xjAwdBn0Xzt9z + khFICzXrl4zZIhpdUt80hP3AmiXbKxKQfZCdQFlj0GT31hU0MKoZoEovKa6z/eM86A1E + hKTwrEg+7tbsLQyNEyehexWS8HtxNBnZykAB4pvohGw2bBgsShF3ETBrHwmjYWt6Ffj7 + SsN8adYZr8T/mgOsM8YLJHFKAPBgdxcpOuMEaA0NUEx3FBUKWhlkC4Na1g15TFb7jsa9 + zd7g== +X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=1e100.net; s=20130820; + h=x-gm-message-state:to:subject:in-reply-to:references:from:date + :message-id:mime-version; + bh=44rp5rV/jE5sc0G3Orm4ePHyRcZ8a+kJe4dXrucmKtU=; + b=mRR1kC7evG/0MbybZWxVt4LsqXNpfBN+r3XjMzk8yrcqpbioh5KfTZYw5UP/6jhxcr + 3bGzNZfg0SqXkwML5YvZvaW+xtcGYOpNB1P6rStZyZuYhQa2Bbq030o5kZtoHFSoSM8V + QjEfNkBLOBeV3iqjpFzv9j9GlL2W88JgcHyGuk/0tMkpk53PKvmvPjmegNLSsyEmL6Zk + T8zYraiAMm2CnvMR8Z76jI3yYJBCpxwRHS6jGaz8ahLE24ZO5qFnBhcVQGuWgxi0txo1 + Et++sYoT6VM+520c3B6jAT3xQfO+phdCgHh2c6XbfBU3HTSwN33sZyVcOR4V6K03+9yQ + 5azQ== +X-Gm-Message-State: + AOPr4FVOVEOhRK7WeWBuMt8+rolVNhM9ryyRQ1Wd+RBvGkRiLprPyMAKYoajWnU8SO5k+Q== +X-Received: by 10.28.6.138 with SMTP id 132mr23270653wmg.60.1462271298049; + Tue, 03 May 2016 03:28:18 -0700 (PDT) +Received: from disaster-area.hh.sledj.net + ([2a01:348:1a2:1:ea39:35ff:fe2c:a227]) + by smtp.gmail.com with ESMTPSA id d79sm23751800wmi.23.2016.05.03.03.28.16 + (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); + Tue, 03 May 2016 03:28:16 -0700 (PDT) +Received: from localhost (disaster-area.hh.sledj.net [local]) + by disaster-area.hh.sledj.net (OpenSMTPD) with ESMTPA id 87fe421f; + Tue, 3 May 2016 10:28:15 +0000 (UTC) +To: Mark Walters , notmuch@notmuchmail.org +Subject: Re: [PATCH v1 1/2] emacs: Observe the charset of MIME parts when + reading them. +In-Reply-To: <877ffc9agl.fsf@qmul.ac.uk> +References: <1461999108-68582-1-git-send-email-dme@dme.org> + <1461999108-68582-2-git-send-email-dme@dme.org> <877ffc9agl.fsf@qmul.ac.uk> +From: David Edmondson +Date: Tue, 03 May 2016 11:28:15 +0100 +Message-ID: +MIME-Version: 1.0 +Content-Type: text/plain +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.20 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Tue, 03 May 2016 10:28:28 -0000 + +On Mon, May 02 2016, Mark Walters wrote: +> On Sat, 30 Apr 2016, David Edmondson wrote: +>> `notmuch--get-bodypart-raw' previously assumed that all non-binary MIME +>> parts could be successfully read by assuming that they were UTF-8 +>> encoded. This was demonstrated to be wrong, specifically when a part was +>> marked as ISO8859-1 and included accented characters (which were +>> incorrectly rendered as a result). +>> +>> Rather than assuming UTF-8, attempt to use the part's declared charset +>> when reading it, falling back to US-ASCII if the declared charset is +>> unknown, unsupported or invalid. +> +> As this seemed hard to test (if I understand the bug correctly it didn't +> show up on my test of the entire of the entire performance corpus -- of +> course my testing could have been wrong) would it be possible to add a test +> for it? + +I agree that we should have a test, and I will make one. + +(/me lives in fear of the day when bremner introduces a "no fixes +without tests" policy...)