Subject: Re: bug#7626: mm-charset-override-alist

From: Eli Zaretskii <[email-masked]>
Date: Wed, 19 Jan 2011 21:27:18 -0500

> From: Eli Zaretskii <[email-masked]>
> Date: Wed, 19 Jan 2011 19:40:08 -0500
> Cc: [email-masked]
> Reply-To: Eli Zaretskii <[email-masked]>
> 
> rmail-reply uses the encoding of the message replied to for setting
> the encoding of the reply.

Sorry, that was inaccurate and misleading.  It's not rmail-reply, it's
mail-yank-original who does that, and it only does it if the encoding
of the reply buffer is the default buffer-file-coding-system (i.e. was
not yet set in any non-trivial way).  Here's the relevant part of
mail-yank-original:

	    ;; If they yank the original text, the encoding of the
	    ;; original message is a better default than
	    ;; the default buffer-file-coding-system.
	    (and (coding-system-equal
		  (default-value 'buffer-file-coding-system)
		  buffer-file-coding-system)
		 (setq buffer-file-coding-system
		       (coding-system-change-text-conversion
			buffer-file-coding-system
			(coding-system-base
			 (with-current-buffer original
			   buffer-file-coding-system))))))

The logic behind this is that if your reply cites the original, it had
better start with the encoding of that original.