From: Alexandre Duret-Lutz <adl@lrde.epita.fr>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: 44307@debbugs.gnu.org
Subject: bug#44307: 27.1; UTF-8 parts transferred as 8bit in multipart messages fail to decode
Date: Sun, 10 Jan 2021 15:48:35 +0100 [thread overview]
Message-ID: <87turoyhj0.fsf@lrde.epita.fr> (raw)
In-Reply-To: <874kjoubjy.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sun, 10 Jan 2021 15:11:13 +0100")
Lars Ingebrigtsen <larsi@gnus.org> writes:
> Alexandre Duret-Lutz <adl@lrde.epita.fr> writes:
>
>> Without (mm-disable-multibyte), the patch makes no difference to me.
>
> Darn. The multibyteness here isn't what you should be looking at,
> though -- the " *nntpd*" buffer is multibyte, so it's all gonna end up
> in that state, anyway. We just have to trick Emacs into not
> interpreting the files as text, but as bytes, which is what nnml's
> request-article function does, for instance.
The following patch seems to fix my rendering issues.
I don't understand why nnheader-insert-file-contents with 'raw-text
coding does not seem to work as desired on a multibyte-buffer. I'll try
to play with it more.
This patch has the potential side effect of leaving to-buffer as
multibyte even if it was initially unibyte. I don't know if this could
be an issue. You seem to suggest those buffer are meant to be multibyte
anyway.
You've mentioned the " *nntpd*" buffer, but in make case this code seems
to be always using to-buffer ("*Article nnmaildir+gmail:Inbox*"). Not
sure if this matters.
diff --git a/lisp/gnus/nnmaildir.el b/lisp/gnus/nnmaildir.el
index e4fd976742..ca2b0e1295 100644
--- a/lisp/gnus/nnmaildir.el
+++ b/lisp/gnus/nnmaildir.el
@@ -1351,7 +1351,10 @@ 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))
+ (mm-disable-multibyte)
+ (let ((coding-system-for-read mm-text-coding-system))
+ (nnheader-insert-file-contents nnmaildir-article-file-name))
+ (mm-enable-multibyte))
(cons gname num-msgid))))
(defun nnmaildir-request-post (&optional _server)
--
Alexandre Duret-Lutz
next prev parent reply other threads:[~2021-01-10 14:48 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-29 14:09 bug#44307: 27.1; UTF-8 parts transferred as 8bit in multipart messages fail to decode Thomas Schneider
2020-10-30 13:10 ` Lars Ingebrigtsen
2020-10-30 13:26 ` Andreas Schwab
2020-10-30 13:35 ` Lars Ingebrigtsen
2020-10-30 14:53 ` Andreas Schwab
2020-11-01 12:10 ` Lars Ingebrigtsen
2020-11-01 12:15 ` Andreas Schwab
2020-11-02 14:56 ` Lars Ingebrigtsen
2020-10-30 13:28 ` Andreas Schwab
2021-01-02 20:26 ` Alexandre Duret-Lutz
2021-01-04 21:54 ` Alexandre Duret-Lutz
2021-01-05 10:00 ` Alexandre Duret-Lutz
2021-01-07 13:43 ` Lars Ingebrigtsen
2021-01-05 9:30 ` Lars Ingebrigtsen
2021-01-05 10:07 ` Alexandre Duret-Lutz
2021-01-05 10:14 ` Lars Ingebrigtsen
2021-01-05 11:17 ` Alexandre Duret-Lutz
2021-01-07 14:14 ` Lars Ingebrigtsen
2021-01-07 16:06 ` Alexandre Duret-Lutz
2021-01-07 16:10 ` Lars Ingebrigtsen
2021-01-07 17:07 ` Alexandre Duret-Lutz
2021-01-10 12:27 ` Lars Ingebrigtsen
2021-01-10 14:02 ` Alexandre Duret-Lutz
2021-01-10 14:11 ` Lars Ingebrigtsen
2021-01-10 14:48 ` Alexandre Duret-Lutz [this message]
2021-01-10 15:21 ` Alexandre Duret-Lutz
2021-01-11 14:28 ` Lars Ingebrigtsen
2021-02-02 11:36 ` Alexandre Duret-Lutz
2021-02-04 8:04 ` Lars Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87turoyhj0.fsf@lrde.epita.fr \
--to=adl@lrde.epita.fr \
--cc=44307@debbugs.gnu.org \
--cc=larsi@gnus.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).