Gnus development mailing list
 help / color / mirror / Atom feed
From: Sascha Wilde <wilde@sha-bang.de>
Cc: rms@gnu.org, ding@gnus.org, emacs-devel@gnu.org
Subject: Re: Gnus does not handle quoting in quoted strings correctly.
Date: Sat, 02 Sep 2006 16:03:18 +0200	[thread overview]
Message-ID: <m2mz9is6vt.fsf@kenny.sha-bang.de> (raw)
In-Reply-To: <b4mac5ju9lo.fsf@jpl.org> (Katsumi Yamaoka's message of "Fri, 01 Sep 2006 20:09:23 +0900")

Katsumi Yamaoka <yamaoka@jpl.org> wrote:

>>>>>> In <m2ejuyt0vv.fsf@kenny.sha-bang.de> Sascha Wilde wrote:
>
>> if you have a mail with
>
>> From: "foo \[bar\]" <foo@bar.invalid>
>
>> in the headers, gnus displays the from literately as
>
>> foo \[bar\]
>
>> but according to RfC822/2822 "\" is used in quoted strings as special
>> quoting character and is always (no matter if necessary or not)
>> semantically "invisible".  So it should read:
>
>> foo [bar]
>
> Gnus does so now in both article and summary buffers.  Please
> note that `\"' and `\\' in a quoted string are unchanged since
> `"' and `\' are not qtext (cf. RFC2822 section 3.2.5).

Sorry, I'm not sure if I understand you right.  

Right now gnus (from CVS emacs) does not display quoted pairs in
quoted strings as expected.

Pleas note that according to RfC2822 3.2.5 quoted strings are defined
as:

quoted-string   =       [CFWS]
                        DQUOTE *([FWS] qcontent) [FWS] DQUOTE
                        [CFWS]

where qcontent is

qcontent        =       qtext / quoted-pair

so quoted pairs have to be handled in quoted strings and `\"' and
`\\' are legal quoted pairs (you can quote any "text", see RfC2822
3.2.1 and 3.2.2) so they must be displayed as `"' and `\'.

>> The other way around, when writing display names in quoted strings, no
>> quoting is done even when it would be needed.  Writing a message with
>
>> From: "foo/bar" <foo@bar.invalid>
>
>> the From: header is copied verbatim to the outgoing mail, but should
>> get quoted like:
>
>> From: "foo//bar" <foo@bar.invalid>
>
> Well, I made changes in Gnus' encoder so that it might convert
> "foo/bar" into "foo\/bar".  Is it correct?

oops, sorry, that was a typo by me...

the examples should read 

 From: "foo\bar" <foo@bar.invalid>

and

 From: "foo\\bar" <foo@bar.invalid>

of cause.  What I wanted to say is: Any non qtext character in quoted
strings in the input should be quoted by gnus encoder.

cheers
sascha
-- 
Sascha Wilde
"C++ : an octopus made by nailing extra legs onto a dog"

  parent reply	other threads:[~2006-09-02 14:03 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-30 20:38 Sascha Wilde
2006-09-01 11:09 ` Katsumi Yamaoka
2006-09-01 21:50   ` Richard Stallman
2006-09-01 22:54     ` Katsumi Yamaoka
2006-09-02  0:53       ` Miles Bader
2006-09-02 18:09         ` Richard Stallman
2006-09-02 14:03   ` Sascha Wilde [this message]
2006-09-03  0:19     ` Katsumi Yamaoka
2006-09-03 16:44       ` Sascha Wilde
2006-09-04  1:41         ` 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=m2mz9is6vt.fsf@kenny.sha-bang.de \
    --to=wilde@sha-bang.de \
    --cc=ding@gnus.org \
    --cc=emacs-devel@gnu.org \
    --cc=rms@gnu.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).