* bug in encoded-word encoding
@ 2001-02-18 11:39 vvv
0 siblings, 0 replies; 5+ messages in thread
From: vvv @ 2001-02-18 11:39 UTC (permalink / raw)
Hi,
i composed a mail in gnus (current cvs version), with the following
To: header:
To: Дмитрий И. Гусев <some@where>
gnus encoded it like this:
To: =?koi8-r?b?5M3J1NLJyiDp?=. =?koi8-r?b?59XTxdc=?= <some@where>
which is a bug according to RFC2047:
RFC2047> IMPORTANT: 'encoded-word's are designed to be recognized as 'atom's
RFC2047> by an RFC 822 parser. As a consequence, unencoded white space
RFC2047> characters (such as SPACE and HTAB) are FORBIDDEN within an
RFC2047> 'encoded-word'. For example, the character sequence
RFC2047> =?iso-8859-1?q?this is some text?=
RFC2047> would be parsed as four 'atom's, rather than as a single 'atom' (by
RFC2047> an RFC 822 parser) or 'encoded-word' (by a parser which understands
RFC2047> 'encoded-words'). The correct way to encode the string "this is some
RFC2047> text" is to encode the SPACE characters as well, e.g.
RFC2047> =?iso-8859-1?q?this=20is=20some=20text?=
RFC2047> The characters which may appear in 'encoded-text' are further
RFC2047> restricted by the rules in section 5.
gnus should have included the dot into the encoded-word, instead of
putting int immediately after it.
i think that such a bug was once fixed, but somehow it is again
present. :-(( i wonder, why....
(it is not a good sign that fixed bugs are appearing again and again)
Best,
v.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: bug in encoded-word encoding
2001-02-18 13:55 ` ShengHuo ZHU
@ 2001-02-20 16:07 ` vvv
0 siblings, 0 replies; 5+ messages in thread
From: vvv @ 2001-02-20 16:07 UTC (permalink / raw)
"ZSH" == ShengHuo ZHU writes:
ZSH> But there may be another bug, encoded words in a quoted
ZSH> string. I am not sure how to encode a quoted string with
ZSH> non-ASCII characters. Anyone knows?
i think that quotes should be encoded as part of the encoded-word.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: bug in encoded-word encoding
2001-02-18 11:46 vvv
@ 2001-02-18 13:55 ` ShengHuo ZHU
2001-02-20 16:07 ` vvv
0 siblings, 1 reply; 5+ messages in thread
From: ShengHuo ZHU @ 2001-02-18 13:55 UTC (permalink / raw)
vvv@vsu.ru writes:
> Hi,
>
> i wrote:
>
> > sorry for wrong quote from RFC. i wonder, is this still a buggy
> > behavior?
>
> looks like yes:
>
> RFC2047> Ordinary ASCII text and 'encoded-word's may appear together in the
> RFC2047> same header field. However, an 'encoded-word' that appears in a
> RFC2047> header field defined as '*text' MUST be separated from any adjacent
> RFC2047> 'encoded-word' or 'text' by 'linear-white-space'.
You use a wrong quote. It should be the following one.
,----[ RFC2047 ]
| (3) As a replacement for a 'word' entity within a 'phrase', for example,
| one that precedes an address in a From, To, or Cc header. The ABNF
| definition for 'phrase' from RFC 822 thus becomes:
|
| phrase = 1*( encoded-word / word )
|
| In this case the set of characters that may be used in a "Q"-encoded
| 'encoded-word' is restricted to: <upper and lower case ASCII
| letters, decimal digits, "!", "*", "+", "-", "/", "=", and "_"
| (underscore, ASCII 95.)>. An 'encoded-word' that appears within a
| 'phrase' MUST be separated from any adjacent 'word', 'text' or
| 'special' by 'linear-white-space'.
`----
Since it is a phrase, special characters ("." and others) must be in
quoted string to use within a word (see RFC 822).
But there may be another bug, encoded words in a quoted string. I am
not sure how to encode a quoted string with non-ASCII characters.
Anyone knows?
ShengHuo
--
(setq gnus-posting-styles
'((".*" (signature (format "(setq gnus-posting-styles
'%S)" gnus-posting-styles)))))
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug in encoded-word encoding
@ 2001-02-18 11:46 vvv
2001-02-18 13:55 ` ShengHuo ZHU
0 siblings, 1 reply; 5+ messages in thread
From: vvv @ 2001-02-18 11:46 UTC (permalink / raw)
Hi,
i wrote:
> sorry for wrong quote from RFC. i wonder, is this still a buggy
> behavior?
looks like yes:
RFC2047> Ordinary ASCII text and 'encoded-word's may appear together in the
RFC2047> same header field. However, an 'encoded-word' that appears in a
RFC2047> header field defined as '*text' MUST be separated from any adjacent
RFC2047> 'encoded-word' or 'text' by 'linear-white-space'.
Best,
v.
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug in encoded-word encoding
@ 2001-02-18 11:43 vvv
0 siblings, 0 replies; 5+ messages in thread
From: vvv @ 2001-02-18 11:43 UTC (permalink / raw)
Hi,
i wrote:
> To: =?koi8-r?b?5M3J1NLJyiDp?=. =?koi8-r?b?59XTxdc=?= <some@where>
>
> which is a bug according to RFC2047:
>
> [skipped]
sorry for wrong quote from RFC. i wonder, is this still a buggy
behavior?
Best,
v.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2001-02-20 16:07 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-02-18 11:39 bug in encoded-word encoding vvv
2001-02-18 11:43 vvv
2001-02-18 11:46 vvv
2001-02-18 13:55 ` ShengHuo ZHU
2001-02-20 16:07 ` vvv
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).