13 Dec 18:25
Re: Interpretation of RFC 2047
Bruce Lilly <blilly <at> erols.com>
2002-12-13 17:25:30 GMT
2002-12-13 17:25:30 GMT
Charles Lindsey wrote:
> Would it not a sensible rule be to say that you should decode any occurrence
> of =?<charset>?[BQ]?...?= (subject to the 76 character limit) in any
> header provided:
> (a) it was immediately preceded by '(' or by CFWS
> (b) it was immediately followed by ')' or by CFWS
> (c) it was not contained within a quoted-string
(d) it was not part of a MIME parameter (RFC 2047 expressly forbids 2047
encoding in MIME parameters; RFC 2231 provides a mechanism for parameters
and also extends 2047 to include language tags)
... and more (see below)
> Actually, there is a parsing required, because an encoded word in an
> unstructured header must have LWS (i.e. CFWS) on either side of it, whereas
> it can also have '(' and ')' immediately next to it in a strutured header.
That's not accurate: first, LWS and CFWS are different "(a) =?se2?q?x?="
(quotes for legibility only) is legal whereas " (a)=?se2?q?x?=" is not;
both have CFWS immediately before what looks like an encoded-word, but
only the former has LWS immediately before an encoded-word. And there
are many issues with parentheses; ")=?se2?q?x?=(" in a structured
header which contains no other parentheses does not contain an
encoded-word.
Other areas that immediately come to mind are:
1. RFC 2557 Content-Location, which permits URIs, which in turn (RFC 2396)
(Continue reading)
RSS Feed