[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#44307: 27.1; UTF-8 parts transferred as 8bit in multipart messages f
From: |
Alexandre Duret-Lutz |
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 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
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
- bug#44307: 27.1; UTF-8 parts transferred as 8bit in multipart messages fail to decode, (continued)
- bug#44307: 27.1; UTF-8 parts transferred as 8bit in multipart messages fail to decode, Alexandre Duret-Lutz, 2021/01/05
- bug#44307: 27.1; UTF-8 parts transferred as 8bit in multipart messages fail to decode, Lars Ingebrigtsen, 2021/01/07
- bug#44307: 27.1; UTF-8 parts transferred as 8bit in multipart messages fail to decode, Alexandre Duret-Lutz, 2021/01/07
- bug#44307: 27.1; UTF-8 parts transferred as 8bit in multipart messages fail to decode, Lars Ingebrigtsen, 2021/01/07
- bug#44307: 27.1; UTF-8 parts transferred as 8bit in multipart messages fail to decode, Alexandre Duret-Lutz, 2021/01/07
- bug#44307: 27.1; UTF-8 parts transferred as 8bit in multipart messages fail to decode, Lars Ingebrigtsen, 2021/01/10
- bug#44307: 27.1; UTF-8 parts transferred as 8bit in multipart messages fail to decode, Alexandre Duret-Lutz, 2021/01/10
- bug#44307: 27.1; UTF-8 parts transferred as 8bit in multipart messages fail to decode, Lars Ingebrigtsen, 2021/01/10
- bug#44307: 27.1; UTF-8 parts transferred as 8bit in multipart messages fail to decode,
Alexandre Duret-Lutz <=
- bug#44307: 27.1; UTF-8 parts transferred as 8bit in multipart messages fail to decode, Alexandre Duret-Lutz, 2021/01/10
- bug#44307: 27.1; UTF-8 parts transferred as 8bit in multipart messages fail to decode, Lars Ingebrigtsen, 2021/01/11