From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/59837 Path: main.gmane.org!not-for-mail From: Katsumi Yamaoka Newsgroups: gmane.emacs.gnus.general Subject: Re: Reply misinterprets Commas in encoded-words (Gnus violates RFC Date: Fri, 18 Feb 2005 17:41:14 +0900 Organization: Emacsen advocacy group Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: sea.gmane.org 1108716153 27331 80.91.229.2 (18 Feb 2005 08:42:33 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 18 Feb 2005 08:42:33 +0000 (UTC) Cc: Stefan Wiens Original-X-From: ding-owner+M8378@lists.math.uh.edu Fri Feb 18 09:42:33 2005 Original-Received: from malifon.math.uh.edu ([129.7.128.13] ident=mail) by ciao.gmane.org with esmtp (Exim 4.43) id 1D23hP-0001YL-1b for ding-account@gmane.org; Fri, 18 Feb 2005 09:41:19 +0100 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 1D23he-0005IC-00; Fri, 18 Feb 2005 02:41:34 -0600 Original-Received: from util2.math.uh.edu ([129.7.128.23]) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1D23hV-0005I4-00 for ding@lists.math.uh.edu; Fri, 18 Feb 2005 02:41:25 -0600 Original-Received: from quimby.gnus.org ([80.91.224.244]) by util2.math.uh.edu with esmtp (Exim 4.30) id 1D23hS-00031B-3q for ding@lists.math.uh.edu; Fri, 18 Feb 2005 02:41:22 -0600 Original-Received: from washington.hostforweb.net ([69.61.11.2]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1D23hR-0000b0-00 for ; Fri, 18 Feb 2005 09:41:21 +0100 Original-Received: from localhost ([127.0.0.1]) by washington.hostforweb.net with esmtpa (Exim 4.44) id 1D23hW-0000di-G6; Fri, 18 Feb 2005 03:41:27 -0500 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.110003 (No Gnus v0.3) Emacs/22.0.50 (gnu/linux) Cancel-Lock: sha1:Dnn0mamyKQw2Ic1HbXl/NQW5VyQ= X-Hashcash: 1:20:050218:ding@gnus.org::nk7wcK6arvmH53Gf:00001K4u X-Hashcash: 1:20:050218:s.wi@gmx.net::MRe0WHBcbCggSh0G:000000NY4 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 - washington.hostforweb.net X-AntiAbuse: Original Domain - gnus.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - jpl.org X-Source: X-Source-Args: X-Source-Dir: X-Spam-Score: -4.8 (----) Precedence: bulk Original-Sender: ding-owner@lists.math.uh.edu X-MailScanner-From: ding-owner+m8378@lists.math.uh.edu X-MailScanner-To: ding-account@gmane.org Xref: main.gmane.org gmane.emacs.gnus.general:59837 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:59837 --=-=-= >>>>> In Katsumi Yamaoka wrote: > I agree. Today I found a better way to fix the problem without > modifying the rfc2047 encoder. It doesn't require to modify the > way to build the reply headers either. The solution is to quote > decoded words in the " *gnus article copy*" buffer (in which the > reply headers are extracted) if there are special characters. > The new patch for the trunk is below. Please apply the following additional patch. It is needed so as not to quote words in the Subject header, etc. --=-=-= Content-Type: text/x-patch Content-Disposition: inline --- rfc2047.el~ 2005-02-18 07:31:04 +0000 +++ rfc2047.el 2005-02-18 08:40:05 +0000 @@ -830,9 +830,19 @@ ;; things essentially must not be there. (while (re-search-forward "[\n\r]+" nil t) (replace-match " ")) - (when rfc2047-quote-decoded-words-containing-tspecials - ;; Quote decoded words if there are special characters - ;; which might violate RFC2822. + ;; Quote decoded words if there are special characters + ;; which might violate RFC2822. + (when (and rfc2047-quote-decoded-words-containing-tspecials + (let ((regexp (car (rassq + 'address-mime + rfc2047-header-encoding-alist)))) + (when regexp + (save-restriction + (widen) + (beginning-of-line) + (while (and (memq (char-after) '(? ?\t)) + (zerop (forward-line -1)))) + (looking-at regexp))))) (let (quoted) (goto-char e) (skip-chars-forward " \t") --=-=-=--