Subject: Re: bug#1051: 23.0.60; rmail decoding bug

From: Eli Zaretskii <[email-masked]>
Date: Tue, 30 Sep 2008 11:40:08 +0300

> Date: Tue, 30 Sep 2008 10:32:08 +0300
> From: Eli Zaretskii <[email-masked]>
> Cc: [email-masked], [email-masked],
> 	[email-masked]
> 
> I can reproduce this by reading the test case you sent twice: once
> with "C-u M-x rmail", then with "C-u g".  The second time I get the
> message displayed incorrectly.
> 
> I will debug this and see what I find.

The problem is within mail-unquote-printable-region: it relies on
insert-char to insert a unibyte character, even if the target buffer
is a multibyte buffer.  In Emacs 22.x this works, but not in Emacs 23.

Perhaps Handa-san can suggest what is the best way of inserting
unibyte characters into a multibyte buffer in Emacs 23.  Obviously,
insert-file-contents does that when coding-system-for-read is bound to
no-conversion.