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: Sun, 10 Jan 2021 16:21:08 +0100 Message-ID: <87pn2cyg0r.fsf@lrde.epita.fr> References: <8735zj6q6h.fsf@goulash.lrde.epita.fr> <8735zf3f46.fsf@gnus.org> <87k0srg0hz.fsf@goulash.lrde.epita.fr> <87wnwo3kd2.fsf@gnus.org> <87wnwo7muj.fsf@lrde.epita.fr> <87wnwlugd0.fsf@gnus.org> <874kjoc2ks.fsf@lrde.epita.fr> <874kjoubjy.fsf@gnus.org> <87turoyhj0.fsf@lrde.epita.fr> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22843"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (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 Sun Jan 10 16:22:11 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 1kycXj-0005pC-Ah for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 10 Jan 2021 16:22:11 +0100 Original-Received: from localhost ([::1]:39138 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kycXi-0000aj-CM for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 10 Jan 2021 10:22:10 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46932) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kycXa-0000aU-FL for bug-gnu-emacs@gnu.org; Sun, 10 Jan 2021 10:22:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:43146) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kycXa-0002xN-88 for bug-gnu-emacs@gnu.org; Sun, 10 Jan 2021 10:22:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kycXa-0000ms-4X; Sun, 10 Jan 2021 10:22: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: Sun, 10 Jan 2021 15:22: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.16102920782935 (code B ref 44307); Sun, 10 Jan 2021 15:22:02 +0000 Original-Received: (at 44307) by debbugs.gnu.org; 10 Jan 2021 15:21:18 +0000 Original-Received: from localhost ([127.0.0.1]:54689 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kycWs-0000lG-6j for submit@debbugs.gnu.org; Sun, 10 Jan 2021 10:21:18 -0500 Original-Received: from mail-wr1-f51.google.com ([209.85.221.51]:38515) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kycWq-0000l0-Li for 44307@debbugs.gnu.org; Sun, 10 Jan 2021 10:21:17 -0500 Original-Received: by mail-wr1-f51.google.com with SMTP id r7so13805548wrc.5 for <44307@debbugs.gnu.org>; Sun, 10 Jan 2021 07:21:16 -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=/Ai6EogWKDXNZGdNJLWConD+y2wE0neT1uFZ/Bcybrs=; b=IY49UUFC9xWHghULSwAtx3V1+2z2mEep0gXMf6aO2C5e3tO7J+kYsk3NiwPVheK7RR h8S581Ww9d1OPCCzFpU5bI736YFHDpvdpOO96JTDAFEFU7PqvXhKFYwHekr7X2k1Cypa pyIbhHPO/O0EY3ljd3S7mqeqFwW25hAl8xKcAABcmYAs+n0N8Qr+pmT6xkGjfWI9jfYf xZSrnfemOODC5Qt+zcsBn4RMcqzPqRsr/Pr0wKCsnOM5+q6K/xMvJSMF6kdytAH6+OsH 1Wgi/m+TnsPIGck5LNktzZ6LWm2imHRgekDBD2ZcgHsngnqVt6eM3c7dmkFZ6VzCZGvT /rCA== 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=/Ai6EogWKDXNZGdNJLWConD+y2wE0neT1uFZ/Bcybrs=; b=ryxnCNyLE8ZYW+5FQMybmfc8O88CX/MNA397IwX4p8A2R1zFKtFvMnTNWOGcVuTEyh KcE7725VZ2cm2fqAqYY8D07ZFDShL6gUYIfRELt6zm9JNxXm/3rZp/w3GDqLj+dJY2JC BCaQ0pi69hMKLuAIKlhInCqAzGipoXzl1JunFa2+x09/RwBvXcYFskjBIcan/H4To6Vf Ryp75tsmWxhNpenflOXDelqbjH2H38mdgYeuVhBOt4lw/YnBe3uhJ1HyqexUVl2JkF9E qscGJ4Ccv9vWW9rm0yoRe5kG0FHNqjdZjmoZ25dR/3YxB6a9ApbeAn+SFdvK4EGgg4CB NhGg== X-Gm-Message-State: AOAM533phkq6rS7XZpF/IbDHk2Elv5HXz/JED1HvcLbB2fc5ZhdB7ycK Fnn837G7eoOFjQp6lCDT7VLfdMnX+OCywA== X-Google-Smtp-Source: ABdhPJxGDzKEaNpRymH3tsWR0NbcezR21NB5bsuKK79yR39WdzXh0R5U5xMcZhbQh/v31EwdXtXUvA== X-Received: by 2002:adf:dc84:: with SMTP id r4mr12182607wrj.232.1610292070866; Sun, 10 Jan 2021 07:21:10 -0800 (PST) Original-Received: from goulash (89-109-190-109.dsl.ovh.fr. [109.190.109.89]) by smtp.gmail.com with ESMTPSA id j10sm20261504wmj.7.2021.01.10.07.21.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 Jan 2021 07:21:09 -0800 (PST) In-Reply-To: <87turoyhj0.fsf@lrde.epita.fr> (Alexandre Duret-Lutz's message of "Sun, 10 Jan 2021 15:48:35 +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:197626 Archived-At: Alexandre Duret-Lutz writes: > I don't understand why nnheader-insert-file-contents with 'raw-text > coding does not seem to work as desired on a multibyte-buffer. OK, that was silly: nnheader-insert-file-contents resets coding-system-for-read to 'undecided. The following also seems to fix the rendering of all my mails. diff --git a/lisp/gnus/nnmaildir.el b/lisp/gnus/nnmaildir.el index e4fd976742..2a4c74db5e 100644 --- a/lisp/gnus/nnmaildir.el +++ b/lisp/gnus/nnmaildir.el @@ -1351,7 +1351,8 @@ nnmaildir-request-article (throw 'return nil)) (with-current-buffer (or to-buffer nntp-server-buffer) (erase-buffer) - (nnheader-insert-file-contents nnmaildir-article-file-name)) + (let ((coding-system-for-read mm-text-coding-system)) + (mm-insert-file-contents nnmaildir-article-file-name))) (cons gname num-msgid)))) (defun nnmaildir-request-post (&optional _server) -- Alexandre Duret-Lutz