usefor-article-11 June 2003
[< Prev]
[TOC] [ Next >]
2.4.3. Syntax copied from other standards
The following syntactic forms, taken from [RFC 2234] or from [RFC
2822] and adapted to incorporate variations introduced in [RFC 2047],
are repeated here for convenience only:
ALPHA = %x41-5A / ; A-Z
%x61-7A ; a-z
CR = %x0D ; carriage return
CRLF = CR LF
DIGIT = %x30-39 ; 0-9
HTAB = %x09 ; horizontal tab
LF = %x0A ; line feed
SP = %x20 ; space
NO-WS-CTL = %d1-8 / ; US-ASCII control characters
%d11 / ; which do not include the
%d12 / ; carriage return, line feed,
%d14-31 / ; and whitespace characters
%d127
specials = "(" / ")" / ; Special characters used in
"<" / ">" / ; other parts of the syntax
"[" / "]" /
":" / ";" /
"@" / "\" /
"," / "." /
DQUOTE
WSP = SP / HTAB ; whitespace characters
FWS = ([*WSP CRLF] 1*WSP); folding whitespace
ccontent = ctext / quoted-pair / comment / encoded-word
comment = "(" *([FWS] ccontent) [FWS] ")"
CFWS = *([FWS] comment) ( ([FWS] comment) / FWS )
DQUOTE = %d34 ; quote mark
quoted-pair = "\" text
atext = ALPHA / DIGIT /
"!" / "#" / ; Any US-ASCII character except
"$" / "%" / ; controls, SP, and specials.
"&" / "'" / ; Used for atoms
"*" / "+" /
"-" / "/" /
"=" / "?" /
"^" / "_" /
"`" / "{" /
"|" / "}" /
"~"
atom = [CFWS] 1*atext [CFWS]
dot-atom = [CFWS] dot-atom-text [CFWS]
dot-atom-text = 1*atext *( "." 1*atext )
qcontent = qtext / quoted-pair
quoted-string = [CFWS] DQUOTE
*( [FWS] qcontent ) [FWS]
DQUOTE [CFWS]
word = atom / quoted-string
The following are taken from [RFC 2045] and [RFC 2231] adapted to use
the folding syntax from [RFC 2822]:
charset = <registered character set name>
; [RFC 2978]
language = <registered language tag>
; [RFC 3066]
encoded-word = "=?" charset ["*" language] "?" encoding
"?" encoded-text "?="
parameter = regular-parameter / extended-parameter
regular-parameter = [CFWS] regular-parameter-name [CFWS]
"=" value
regular-parameter-name = attribute [section]
attribute = 1*attribute-char
attribute-char= <any (US-ASCII) CHAR except SPACE, CTLs,
"*", "'", "%", or tspecials>
tspecials = "(" / ")" / "<" / ">" / "@" /
"," / ";" / ":" / "\" / DQUOTE /
"/" / "[" / "]" / "?" / "="
extended-parameter
= ( [CFWS] extended-initial-name [CFWS]
"=" extended-initial-value ) /
( [CFWS] extended-other-names [CFWS]
"=" extended-other-values )
value = [CFWS] token [CFWS] / quoted-string
token = 1*<any (US-ASCII) CHAR except SP, CTLs,
or tspecials>
NOTE: Following [RFC 2234], literal text included in the syntax
is to be regarded as case-insensitive. However, in
contradistinction to [RFC 2822], the Netnews protocols are
sensitive to case in some instances (as in newsgroup-names, some
header parameters, etc.). Care has been taken to indicate this
explicitly where required.
As in [RFC 2822], where any quoted-pair appears it is to be
interpreted as its text character alone. That is to say, the "\"
character that appears as part of a quoted-pair is semantically
"invisible".
Again, as in [RFC 2822], strings of characters that include
characters not syntactically allowed in some particular context may
be incorporated into a quoted-string by "encapsulating" them between
quote (DQUOTE, US-ASCII 34) characters, prefixing every quote and
backslash character (and possibly other characters too) with a "\" so
as to form a quoted-pair, and possibly introducing folding by
prefixing some WSP with CRLF.
The semantic value of a quoted-string (i.e. the result of reversing
the encapsulation) is a string of characters which includes neither
the optional CFWS outside of the quote characters, nor the quote
characters themselves, nor any CRLF contained within any FWS between
the two quote characters, nor the "\" which introduces any quoted-
pair.
For the purposes of section 5 of [RFC 2047] all headers (4.1) defined
in this standard are to be considered as "extension message header
fields" (insofar as they are not already so considered under the
existing Email standards), permitting the use of [RFC 2047] encodings
within any unstructured header, or within any comment or phrase
permitted within any structured header.
The syntax of encoded-text and of encoding can be found in [RFC
2047], and there are restrictions on the characters that may occur
within an encoded-text, depending on its context. There are also
restrictions on the overall length of an encoded-word and of headers
containing encoded-words and requirements for encoded-words to have
FWS on either side of them in most contexts. All these restrictions
and requirements MUST be observed.
[< Prev]
[TOC] [ Next >]
#Diff to first older
--- ../usefor-article-10/Syntax_copied_from_other_standards.out April 2003
+++ ../usefor-article-11/Syntax_copied_from_other_standards.out June 2003
@@ -50,7 +50,6 @@
*( [FWS] qcontent ) [FWS]
DQUOTE [CFWS]
word = atom / quoted-string
- phrase = 1*( [CFWS] encoded-word [CFWS] / word )
The following are taken from [RFC 2045] and [RFC 2231] adapted to use
the folding syntax from [RFC 2822]:
@@ -87,6 +86,8 @@
header parameters, etc.). Care has been taken to indicate this
explicitly where required.
+
+
As in [RFC 2822], where any quoted-pair appears it is to be
interpreted as its text character alone. That is to say, the "\"
character that appears as part of a quoted-pair is semantically
@@ -112,9 +113,13 @@
fields" (insofar as they are not already so considered under the
existing Email standards), permitting the use of [RFC 2047] encodings
within any unstructured header, or within any comment or phrase
- permitted within any structured header. The syntax of encoded-text
- and of encoding can be found in [RFC 2047], and there are
- restrictions on the characters that may occur within an encoded-text,
- depending on its context. These restrictions MUST be observed, as
- must the restrictions on the overall length of an encoded-word.
+ permitted within any structured header.
+
+ The syntax of encoded-text and of encoding can be found in [RFC
+ 2047], and there are restrictions on the characters that may occur
+ within an encoded-text, depending on its context. There are also
+ restrictions on the overall length of an encoded-word and of headers
+ containing encoded-words and requirements for encoded-words to have
+ FWS on either side of them in most contexts. All these restrictions
+ and requirements MUST be observed.