From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/58765 Path: main.gmane.org!not-for-mail From: TSUCHIYA Masatoshi Newsgroups: gmane.emacs.gnus.general Subject: decode text/* parts before displaying them Date: Thu, 07 Oct 2004 14:41:41 +0000 Sender: ding-owner@lists.math.uh.edu Message-ID: <87ekkavbdm.fsf@namazu.org> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: sea.gmane.org 1097160149 24703 80.91.229.6 (7 Oct 2004 14:42:29 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 7 Oct 2004 14:42:29 +0000 (UTC) Original-X-From: ding-owner+M7304@lists.math.uh.edu Thu Oct 07 16:42:13 2004 Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13] ident=mail) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CFZTA-0008OI-00 for ; Thu, 07 Oct 2004 16:42:12 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu ident=lists) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 1CFZSu-0002xT-00; Thu, 07 Oct 2004 09:41:56 -0500 Original-Received: from util2.math.uh.edu ([129.7.128.23]) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1CFZSm-0002xN-00 for ding@lists.math.uh.edu; Thu, 07 Oct 2004 09:41:48 -0500 Original-Received: from justine.libertine.org ([66.139.78.221] ident=postfix) by util2.math.uh.edu with esmtp (Exim 4.30) id 1CFZSm-00047m-He for ding@lists.math.uh.edu; Thu, 07 Oct 2004 09:41:48 -0500 Original-Received: from vaj.namazu.org (vaj.namazu.org [61.215.208.42]) by justine.libertine.org (Postfix) with ESMTP id D248E3A0027 for ; Thu, 7 Oct 2004 09:41:44 -0500 (CDT) Original-Received: from vaj.namazu.org (vaj.namazu.org [61.215.208.42]) by vaj.namazu.org (Postfix) with ESMTP id 832FADB0C6 for ; Thu, 7 Oct 2004 23:41:43 +0900 (JST) Original-To: ding@gnus.org Mail-Followup-To: ding@gnus.org User-Agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3 (gnu/linux) X-Dispatcher: imput version 20040704(IM147) Original-Lines: 90 Precedence: bulk Xref: main.gmane.org gmane.emacs.gnus.general:58765 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:58765 --=-=-= Hi, The following attached part is not displayed with current Gnus. --=-=-= Content-Type: text/x-tex; charset=euc-jp Content-Disposition: inline; filename=eucjp.tex Content-Transfer-Encoding: base64 XGRvY3VtZW50Y2xhc3N7amFydGljbGV9DQpcYmVnaW57ZG9jdW1lbnR9DQqj w6Pho+6hoaP5o++j9aGho/Kj5aPho+ShoaP0o+ij5aPzo+WhoaPjo+ij4aPy o+Gj46P0o+Wj8qPzoakNClxlbmR7ZG9jdW1lbnR9DQo= --=-=-= In order to avoid this problem, I have just installed the following change: 2004-10-07 TSUCHIYA Masatoshi * gnus-art.el (gnus-mime-display-single): Call `mm-display-inline' instead of calling `mm-insert-inline', to decode text/* parts before displaying them. I, however, worry whether this change is appropriate or not, because there are several choices to fix this problem. The first choice is my proposal. The second choice is to call `mm-inline-text' instead of calling `mm-insert-inline'. --=-=-= Content-Type: text/x-patch Content-Disposition: inline --- gnus-art.el 6 Oct 2004 07:48:57 -0000 7.55 +++ gnus-art.el 7 Oct 2004 14:05:35 -0000 @@ -4709,7 +4709,7 @@ (forward-line -1) (setq beg (point))) (gnus-article-insert-newline) - (mm-insert-inline handle (mm-get-part handle)) + (mm-inline-text handle) (goto-char (point-max)))) ;; Do highlighting. (save-excursion --=-=-= Content-Disposition: inline The last choice is to decode a part content before calling `mm-insert-inline'. --=-=-= Content-Type: text/x-patch Content-Disposition: inline --- gnus-art.el 6 Oct 2004 07:48:57 -0000 7.55 +++ gnus-art.el 7 Oct 2004 14:07:34 -0000 @@ -4709,7 +4709,14 @@ (forward-line -1) (setq beg (point))) (gnus-article-insert-newline) - (mm-insert-inline handle (mm-get-part handle)) + (mm-insert-inline handle + (let ((charset + (mail-content-type-get + (mm-handle-type handle) 'charset))) + (if (eq charset 'gnus-decoded) + (mm-get-part handle) + (mm-decode-string (mm-get-part handle) + charset)))) (goto-char (point-max)))) ;; Do highlighting. (save-excursion --=-=-= Content-Disposition: inline Could you tell me which choice is best? -- TSUCHIYA Masatoshi --=-=-=--