Subject: bug#13808: Gnus gratuiously messes with the encoding of attachments

From: Lars Ingebrigtsen <[email-masked]>
Date: Wed, 25 Jan 2017 16:51:12 +0100

The mml encoding code is headache-inducing, probably because it was
written to support non-Mule and XEmacs and modern Emacs at the same
time.  So you have stuff like:

(defun mm-find-charset-region (b e)
  "Return a list of Emacs charsets in the region B to E."
  (cond
   ((mm-multibyte-p)

[...]

   (t
    ;; We are in a unibyte buffer, so we futz around a bit.

[...]

		      (car (last (assq mail-parse-charset
				       mm-mime-mule-charset-alist)))))
	    (list 'ascii (or charset 'latin-iso8859-1)))))))))

which is part of what's biting us here.

I wonder whether the best solution here is to just rewrite the mml code
completely.  There's so much...  magic in the various code paths.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no