From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/63987 Path: news.gmane.org!not-for-mail From: Katsumi Yamaoka Newsgroups: gmane.emacs.gnus.general Subject: Re: Attachments in forwarded messages garbled Date: Tue, 14 Nov 2006 20:55:01 +0900 Organization: Emacsen advocacy group Message-ID: References: <87psbyed2i.fsf@pereiro.luannocracy.com> <87mz71c0uh.fsf@pereiro.luannocracy.com> <87y7qk4042.fsf@pereiro.luannocracy.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1163505407 3815 80.91.229.2 (14 Nov 2006 11:56:47 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 14 Nov 2006 11:56:47 +0000 (UTC) Cc: David Abrahams Original-X-From: ding-owner+M12510@lists.math.uh.edu Tue Nov 14 12:56:45 2006 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Gjwu0-0002ih-WB for ding-account@gmane.org; Tue, 14 Nov 2006 12:56:34 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1Gjwt2-0006sv-QW; Tue, 14 Nov 2006 05:55:32 -0600 Original-Received: from mx1.math.uh.edu ([129.7.128.32]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1Gjwt1-0006sP-17 for ding@lists.math.uh.edu; Tue, 14 Nov 2006 05:55:31 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtp (Exim 4.63) (envelope-from ) id 1Gjwsu-0002ZF-65 for ding@lists.math.uh.edu; Tue, 14 Nov 2006 05:55:30 -0600 Original-Received: from orlando.hostforweb.net ([216.246.45.90]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1Gjwso-0003Qo-00 for ; Tue, 14 Nov 2006 12:55:18 +0100 Original-Received: from [66.225.201.151] (port=35693 helo=mail.jpl.org) by orlando.hostforweb.net with esmtpa (Exim 4.52) id 1Gjwso-0001Xq-1m; Tue, 14 Nov 2006 05:55:18 -0600 Original-To: ding@gnus.org X-Face: #kKnN,xUnmKia.'[pp`;Omh}odZK)?7wQSl"4o04=EixTF+V[""w~iNbM9ZL+.b*_CxUmFk B#Fu[*?MZZH@IkN:!"\w%I_zt>[$nm7nQosZ<3eu;B:$Q_:p!',P.c0-_Cy[dz4oIpw0ESA^D*1Lw= L&i*6&( User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/23.0.0 (gnu/linux) Cancel-Lock: sha1:4Jx81jl2DEFPHyqTG9Ftky/maVg= X-Antivirus-Scanner: Clean mail though you should still use an Antivirus X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - orlando.hostforweb.net X-AntiAbuse: Original Domain - gnus.org X-AntiAbuse: Originator/Caller UID/GID - [0 0] / [47 12] X-AntiAbuse: Sender Address Domain - jpl.org X-Source: X-Source-Args: X-Source-Dir: X-Spam-Score: -2.5 (--) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:63987 Archived-At: >>>>> In >>>>> Reiner Steib wrote: > [ Redirecting this bug report to ding. > See http://thread.gmane.org/87psbyed2i.fsf%40pereiro.luannocracy.com > or http://thread.gmane.org/gmane.emacs.gnus.user/8168/focus=8176 > for the complete thread. ] [...] > Could someone look into this problem, please? The problem occurs with only Emacs 23, in which `string-as-multibyte' and `mm-with-unibyte-current-buffer' destroy binary data. I've fixed them in the Gnus trunk and the v5-10 branch. There will still be similar things and we will have to fix them one by one. Here's a diff: --8<---------------cut here---------------start------------->8--- --- mm-decode.el~ 2006-05-11 09:02:07 +0000 +++ mm-decode.el 2006-11-14 11:07:55 +0000 @@ -1135,7 +1135,7 @@ (with-current-buffer (mm-handle-buffer handle) (buffer-string))) ((mm-multibyte-p) - (mm-string-as-multibyte (mm-get-part handle no-cache))) + (mm-string-to-multibyte (mm-get-part handle no-cache))) (t (mm-get-part handle no-cache)))))) --- mml.el~ 2006-04-26 16:07:37 +0000 +++ mml.el 2006-11-14 11:34:45 +0000 @@ -501,9 +501,9 @@ (mm-with-unibyte-buffer (cond ((cdr (assq 'buffer cont)) - (insert (with-current-buffer (cdr (assq 'buffer cont)) - (mm-with-unibyte-current-buffer - (buffer-string))))) + (insert (mm-string-as-unibyte + (with-current-buffer (cdr (assq 'buffer cont)) + (buffer-string))))) ((and filename (not (equal (cdr (assq 'nofile cont)) "yes"))) (let ((coding-system-for-read mm-binary-coding-system)) --8<---------------cut here---------------end--------------->8---