Gnus development mailing list
 help / color / mirror / Atom feed
* \201's back in 8-bit MIME parts
@ 2000-05-19  4:36 Lars Magne Ingebrigtsen
  2000-05-19  5:29 ` Shenghuo ZHU
  0 siblings, 1 reply; 2+ messages in thread
From: Lars Magne Ingebrigtsen @ 2000-05-19  4:36 UTC (permalink / raw)


The following new code in mm-decode.el seems to lead to the text being
decoded twice:

	    (if (eq (or (mm-handle-encoding handle)
			(with-current-buffer (mm-handle-buffer handle)
			  (mm-body-7-or-8)))
		    '8bit)
		;; Emacs MULE can not handle some 8bit characters in 
		;; multibyte character!!
		(let ((text (with-current-buffer (mm-handle-buffer handle)
			      (mm-with-unibyte-current-buffer
				(buffer-string)))))
		  (mm-with-unibyte-current-buffer
		    (insert text)))
	      (insert-buffer-substring (mm-handle-buffer handle)))

The `insert' up there into a multibyte buffer actually decodes the
text automatically (in Emacs 20.6, at least), so perhaps, er, some
variable or other should be bound to avoid having that done.

-- 
(domestic pets only, the antidote for overdose, milk.)
   larsi@gnus.org * Lars Magne Ingebrigtsen



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: \201's back in 8-bit MIME parts
  2000-05-19  4:36 \201's back in 8-bit MIME parts Lars Magne Ingebrigtsen
@ 2000-05-19  5:29 ` Shenghuo ZHU
  0 siblings, 0 replies; 2+ messages in thread
From: Shenghuo ZHU @ 2000-05-19  5:29 UTC (permalink / raw)


>>>>> "LMI" == Lars Magne Ingebrigtsen <larsi@gnus.org> writes:

LMI> The following new code in mm-decode.el seems to lead to the text being
LMI> decoded twice:

LMI> 	    (if (eq (or (mm-handle-encoding handle)
LMI> 			(with-current-buffer (mm-handle-buffer handle)
LMI> 			  (mm-body-7-or-8)))
LMI> 		    '8bit)
LMI> 		;; Emacs MULE can not handle some 8bit characters in 
LMI> 		;; multibyte character!!
LMI> 		(let ((text (with-current-buffer (mm-handle-buffer handle)
LMI> 			      (mm-with-unibyte-current-buffer
LMI> 				(buffer-string)))))
LMI> 		  (mm-with-unibyte-current-buffer
LMI> 		    (insert text)))
LMI> 	      (insert-buffer-substring (mm-handle-buffer handle)))

LMI> The `insert' up there into a multibyte buffer actually decodes
LMI> the text automatically (in Emacs 20.6, at least), so perhaps, er,
LMI> some variable or other should be bound to avoid having that done.

The mm-with-unibyte-current-buffer macro temporally disables multibyte
feature of the current buffer, so the `insert' up there actually
inserts the text into a unibyte buffer (without decoding).  With this
code, Gnus handles 8-bit UTF-8 part correctly in Emacs 20.6. 

Could you send me the message with 8-bit MIME parts?

Shenghuo



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2000-05-19  5:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-05-19  4:36 \201's back in 8-bit MIME parts Lars Magne Ingebrigtsen
2000-05-19  5:29 ` Shenghuo ZHU

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).