Gnus development mailing list
 help / color / mirror / Atom feed
From: Katsumi Yamaoka <yamaoka@jpl.org>
Cc: Stefan Wiens <s.wi@gmx.net>
Subject: Re: Reply misinterprets Commas in encoded-words (Gnus violates RFC
Date: Fri, 18 Feb 2005 17:41:14 +0900	[thread overview]
Message-ID: <b9y8y5mjm51.fsf@jpl.org> (raw)
In-Reply-To: <b9yis4ql3wu.fsf@jpl.org>

[-- Attachment #1: Type: text/plain, Size: 544 bytes --]

>>>>> In <b9yis4ql3wu.fsf@jpl.org> 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.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 937 bytes --]

--- 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")

  reply	other threads:[~2005-02-18  8:41 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-27 13:31 Reply misinterprets Commas in encoded-words (Gnus violates RFC 2047) Reiner Steib
2005-02-14  7:16 ` Katsumi Yamaoka
2005-02-17 12:00   ` Katsumi Yamaoka
2005-02-17 14:07     ` Reply misinterprets Commas in encoded-words (Gnus violates RFC Reiner Steib
2005-02-18  7:32       ` Katsumi Yamaoka
2005-02-18  8:41         ` Katsumi Yamaoka [this message]
2005-02-18 14:44           ` Reiner Steib
2005-02-19  1:25             ` Katsumi Yamaoka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b9y8y5mjm51.fsf@jpl.org \
    --to=yamaoka@jpl.org \
    --cc=s.wi@gmx.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).