Subject: bug#35383: 27.0.50; Complete process of decoding Gnus group names

From: Katsumi Yamaoka <[email-masked]>
Date: Wed, 24 Apr 2019 17:06:19 +0900

Hi,

I found that certain kinds[1] of Japanese mails (like the
attached text part) saved in a nnml group get corrupted when
viewing.  The root cause is this:

(defvar nnmail-file-coding-system 'undecided
  "Coding system used in nnmail.")

The default value used to be `raw-text'.
Because `nnml-file-coding-system' inherits it, when viewing
an article from a file `nnmail-find-file' reads and decodes
the contents, and then `gnus-display-mime'[1] decodes it again.
IIUC `gnus-display-mime' expects a raw article, so any back end
should not decode the first fetched data, I think.  This helps:

(setq nnml-file-coding-system 'raw-text)

Note that the backlog or the `gnus-original-article-buffer'
keeps an corrupted article, so (setq gnus-keep-backlog nil) and
each time killing the original buffer will make it easy to debug.

[1] a single text/plain part with format=flowed spec, or
    a multipart message containing a text/plain part, etc.
[2] The default value of `gnus-display-mime-function'.

Regards,
寿限無寿限無五劫の擦り切れ海砂利水魚の水行末雲来末風来末食う寝る
処に住む処やぶら小路の藪柑子パイポパイポパイポのシューリンガン
シューリンガンのグーリンダイグーリンダイのポンポコピーのポンポコ
ナーの長久命の長助