emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Gnus does not handle quoting in quoted strings correctly.


From: Sascha Wilde
Subject: Re: Gnus does not handle quoting in quoted strings correctly.
Date: Sat, 02 Sep 2006 16:03:18 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

Katsumi Yamaoka <address@hidden> wrote:

>>>>>> In <address@hidden> Sascha Wilde wrote:
>
>> if you have a mail with
>
>> From: "foo \[bar\]" <address@hidden>
>
>> 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" <address@hidden>
>
>> the From: header is copied verbatim to the outgoing mail, but should
>> get quoted like:
>
>> From: "foo//bar" <address@hidden>
>
> 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" <address@hidden>

and

 From: "foo\\bar" <address@hidden>

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"




reply via email to

[Prev in Thread] Current Thread [Next in Thread]