Gnus development mailing list
 help / color / mirror / Atom feed
From: Katsumi Yamaoka <yamaoka@jpl.org>
To: ding@gnus.org
Subject: Re: Reply misinterprets Commas in quoted encoded-words
Date: Tue, 17 Nov 2009 11:23:07 +0900	[thread overview]
Message-ID: <b4mfx8dj3ec.fsf@jpl.org> (raw)
In-Reply-To: <b4mhbsve6w9.fsf@jpl.org>

>>>>> Katsumi Yamaoka wrote:
>>>>>> Reiner Steib wrote:
>> I got the following report in the German Gnus newsgroup [1]: When
>> replying to a mail with this from header ...

>>| From: "=?iso-8859-1?Q?Fghijkl,_Wolf-J=F6rg?=" <schnuerpel@example.com>

>> ... you get the following:

>>| To: ""Fghijkl
>>| Cc: Wolf-Jörg"" <schnuerpel@example.com>

>> On reply Gnus seems to double the quotes.

> Confirmed.  I'm going to make shift to fix this bug.  Thanks.

Fixed in the Gnus trunk.  I've improved the rfc2047 code so as not
to quote decoded words containing special characters (`,' is it in
this case) if there are the quotation marks around the words already.
It is effective only when the quotation marks are adjacent to words,
doesn't check whether the quotation marks are not the ones used for
the neighboring words.  So, the following ones might cause a similar
(or another) problem:

From: " =?iso-8859-1?Q?Fghijkl,_Wolf-J=F6rg?= "
From: "FOO"=?iso-8859-1?Q?Fghijkl,_Wolf-J=F6rg?="BAR"

(It's very hard to distinguish which word is quoted by `"'s)

BTW, please keep in mind that quoted-encoded-words are all illegal.
RFC2047 says:

   + An 'encoded-word' MUST NOT appear within a 'quoted-string'.

Though Gnus decodes even such things for users' convenience.
The person's name should have been encoded as it is done by Gnus as
follows:

(rfc2047-encode-string "\"Fghijkl, Wolf-Jörg\"")
 => "=?iso-8859-1?Q?Fghijkl=2C_Wolf-J=F6rg?="

Note that `, ' is encoded into `=2C_'.

Regards,



      reply	other threads:[~2009-11-17  2:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-13 20:30 Reiner Steib
2009-11-15 22:54 ` Katsumi Yamaoka
2009-11-17  2:23   ` Katsumi Yamaoka [this message]

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=b4mfx8dj3ec.fsf@jpl.org \
    --to=yamaoka@jpl.org \
    --cc=ding@gnus.org \
    /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).