MIME Headers

back: The Specs
next: RFC2231

The normal complications are shown with some examples here on the right. Two main groups of fields are defined: structured fields and unstructured fields. Structured fields have a quite complex syntax with strict regulations about which characters are allowed where.

The first example on the right show some problems: e-mail addresses without phrases do not require angles around them, phrases (like Who?) without complicated characters do not need quotes, and quoted phrases need to escape included quotes.

The second example shows comments, which can be nested and placed nearly anywhere. These comments are really a pain: parsing these lines require collecting balanced unescaped pairs or parenthesis.

The last example shows how non-ascii character sets can be used. Decoding of these lines is not too hard, although there are some tricky rules related to blanks.