From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alexandre Duret-Lutz Newsgroups: gmane.emacs.bugs Subject: bug#44307: 27.1; UTF-8 parts transferred as 8bit in multipart messages fail to decode Date: Tue, 05 Jan 2021 12:17:38 +0100 Message-ID: <87czyjfx9p.fsf@goulash.lrde.epita.fr> References: <8735zj6q6h.fsf@goulash.lrde.epita.fr> <8735zf3f46.fsf@gnus.org> <87k0srg0hz.fsf@goulash.lrde.epita.fr> <87turv1yhw.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18787"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) Cc: 44307@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jan 05 12:18:26 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kwkM6-0004mf-PR for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 05 Jan 2021 12:18:26 +0100 Original-Received: from localhost ([::1]:60538 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kwkM5-0008WP-Dw for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 05 Jan 2021 06:18:25 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36814) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kwkLi-0008WD-Rz for bug-gnu-emacs@gnu.org; Tue, 05 Jan 2021 06:18:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:57634) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kwkLi-0005Qo-L0 for bug-gnu-emacs@gnu.org; Tue, 05 Jan 2021 06:18:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kwkLi-0003d6-DS; Tue, 05 Jan 2021 06:18:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Alexandre Duret-Lutz Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bugs@gnus.org Resent-Date: Tue, 05 Jan 2021 11:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44307 X-GNU-PR-Package: emacs,gnus Original-Received: via spool by 44307-submit@debbugs.gnu.org id=B44307.160984546813916 (code B ref 44307); Tue, 05 Jan 2021 11:18:02 +0000 Original-Received: (at 44307) by debbugs.gnu.org; 5 Jan 2021 11:17:48 +0000 Original-Received: from localhost ([127.0.0.1]:40946 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kwkLU-0003cN-Hf for submit@debbugs.gnu.org; Tue, 05 Jan 2021 06:17:48 -0500 Original-Received: from mail-wr1-f50.google.com ([209.85.221.50]:47069) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kwkLS-0003c5-8Q for 44307@debbugs.gnu.org; Tue, 05 Jan 2021 06:17:46 -0500 Original-Received: by mail-wr1-f50.google.com with SMTP id d13so35754301wrc.13 for <44307@debbugs.gnu.org>; Tue, 05 Jan 2021 03:17:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=RQMhHxjc66tfA8FOwtfph5r31eJpJyBZNLEqc27fVK4=; b=je5BqhI6Ia3VdpTYGOq7nkcLG/gWHYp+5C1a3If061LUqzixQe4EyGuLCmXFxy7jw5 CV7c6uSnhgU7jJOzS21/XXb2y00DQDzalCytRN4rx3FO3q0n4RiVXdW49zbxJ8uxAm99 /YSVKaV58FKvPSWfoJx3+R/oFFbu0Z27XFpSMWrxYd5ivjcmoKk1BQcbf6Lpk8OVfCxw OdKexS5tlJwifEW9GFtV0Hh50K4vTGbgYwjgb4HNrywYj2IqnjclAda7pahM/Mk0qAgG b8oA/WMp/GzhmIDDU8JWS65JblOdyGNr+ycUsRztcxY6Ht28who5qvNvrf+opDEB9wgu Z4JA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=RQMhHxjc66tfA8FOwtfph5r31eJpJyBZNLEqc27fVK4=; b=c6oq5rYTM5tFVaWLKQTUD9jK3zBzMrj+YWEajFC+qh0ae+2Q3t5i/D5vXakq0h4rhA AZbP9ImTUdS/Js+kXHrYcQu6mdbbAHl/bpoGqNYE0Lmy1cx9LXA9ZJU45fVo/RDAQgOY hMDj8LyGJgFUg2O5tMgwmVmP1dNpZjputjGnTBDJVZz0oCP80ki+MXJrUz66k1D21eEk ysQ/BuzaqGcWKsXuJEaFI3EVl95GRl5mdkiD8hIsl7twU05xTkul6+C+bZTc6K7ytSjV Al+kgLvfjFKJUsQCRmSiNXNFh1NxVjjh4umcLoEvra6ygLh4eIseAZ0jTnEAQ5iryiYw Oh/g== X-Gm-Message-State: AOAM5318F3oyosAB82aWXdTh4AWMbdDMXnqWVCK1zeiBml6P4mekpq7i Dt3r8oGqxDEBZbSHIxADH59SkjPGaY00AQ== X-Google-Smtp-Source: ABdhPJxU3hOvSviXfmN4PHB3MOjjI9OWjjlZtTl6D3YhcCg5AwrhTJebu4t+c1PvR5fY5+MOlsNmng== X-Received: by 2002:a05:6000:368:: with SMTP id f8mr83990453wrf.150.1609845460326; Tue, 05 Jan 2021 03:17:40 -0800 (PST) Original-Received: from goulash (89-109-190-109.dsl.ovh.fr. [109.190.109.89]) by smtp.gmail.com with ESMTPSA id b13sm92599044wrt.31.2021.01.05.03.17.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Jan 2021 03:17:39 -0800 (PST) In-Reply-To: <87turv1yhw.fsf@gnus.org> (Lars Ingebrigtsen's message of "Tue, 05 Jan 2021 11:14:51 +0100") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:197370 Archived-At: Lars Ingebrigtsen writes: > Alexandre Duret-Lutz writes: > >> Here is the file. But see by previous message from today. Reading this >> with nndoc will appear bogus with emacs 27.1, but not with emacs 28. >> However if there is a way to read that mail with nnmaildir, you should >> see the issue with both versions. > > Thanks for the test file (and the analysis of the differences between > 27.1 and 28 here). I'll try to work on fix for this in Emacs 27 > tomorrow -- I'm not sure the simple fix you outlined won't have adverse > effects if the part in question is binary (i.e., an image or the like). Sorry, you can ignore my simple "fix": I have now found a case that it breaks. I was testing mainly on utf-8 messages. But I've now looked (through nnmaildir) at a mail containing a part encoded as follow: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit However the rendering was garbled. Looking ag the output of "C-u g" I can see that the buffer contains utf-8 code (I'm guessing because that the windows-1252 representation was decoded when nnmaildir read the mail from file), and that will make no sense once Gnus attempts to decode that in windows-1252. Without my incorrect patch, displaying such an email would appear to work (by luck?), because when mm-with-part inserts the multibyte buffer into the unibyte buffer, the utf-8 characters are somehow converted to their windows-1252 equivalent encoding. I guess the real issue is that mmaildir does not correctly deal with multibyte files et may return multibyte buffer, just like nndoc used to. -- Alexandre Duret-Lutz