Subject: Re: bug#1174: 23.0.60; Some UTF-8 mails displaying wrongly in Emacs 23

From: Frank Schmitt <[email-masked]>
Date: Fri, 17 Oct 2008 12:08:15 +0200

Eli Zaretskii <[email-masked]> writes:

>> > It was acatually the right hint.  ISTR there was a problem in Gnus with
>> > 8-bit encoded articles, but all I could find is
>> > <http://permalink.gmane.org/gmane.emacs.gnus.general/67112>.
>> 
>> Yes, this seems to be the same problem I am seeing. Any idea on how I
>> could further debug this? It is a real show-stopper for me.

Got it!

In lisp/gnus/nnimap.el there is 

(defun nnimap-demule (string)
  ;; BEWARE: we used to use string-as-multibyte here which is braindead
  ;; because it will turn accidental emacs-mule-valid byte sequences
  ;; into multibyte chars.  --Stef
  ;; Reverted, braindead got 7.5 out of 10 on imdb, so it can't be
  ;; that bad. --Simon
  (funcall (if (and (fboundp 'string-as-multibyte)
		    (subrp (symbol-function 'string-as-multibyte)))
	       'string-as-multibyte
	     'identity)
	   (or string "")))

which is called at several places. And this breaks it. If I change this
function so that string is not changed, my mails are displayed correctly.

-- 
Have you ever considered how much text can fit in eighty columns?  Given that a
signature typically contains up to four lines of text, this space allows you to
attach a tremendous amount of valuable information to your messages.  Seize the
opportunity and don't waste your signature on bullshit that nobody cares about.