GNU bug report logs -
#44307
27.1; UTF-8 parts transferred as 8bit in multipart messages fail to decode
Previous Next
Reported by: Thomas Schneider <qsx <at> chaotikum.eu>
Date: Thu, 29 Oct 2020 14:12:01 UTC
Severity: normal
Tags: fixed
Merged with 45657
Found in version 27.1
Fixed in version 28.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Lars Ingebrigtsen <larsi <at> gnus.org> writes:
> Alexandre Duret-Lutz <adl <at> 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
This bug report was last modified 4 years and 159 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.