RFC 1342 (rfc1342) - Page 2 of 7


Representation of Non-ASCII Text in Internet Message Headers



Alternative Format: Original Text Document



RFC 1342                 Non-ASCII Mail Headers                June 1992


   While it is unfortunate that these programs do not correctly
   interpret RFC 822 headers, to "break" these programs would cause
   severe operational problems for the Internet mail system.  The
   extensions described in this memo therefore do not rely on little-
   used features of RFC 822.  Instead, certain sequences of "ordinary"
   printable ASCII characters (which are assumed to be unlikely to
   otherwise appear in message headers) are reserved for use as encoded
   data.  The characters used in these encodings are restricted to those
   which do not have special meanings in the context in which the
   encoded text appears.

Encodings

   An "encoded-word" is a sequence of printable ASCII characters that
   begins with "=?", ends with "?=", and has two "?"s in between.  It
   specifies a character set and an encoding method, and also includes
   the original text encoded as ASCII characters, according to the rules
   for that encoding method.

   A mail composer that implements this specification will provide a
   means of inputing non-ASCII text in header fields, but will translate
   these fields (or appropriate portions of these fields) into encoded-
   words before inserting them into the message header.

   A mail reader that implements this specification will recognize
   encoded-words when they appear in certain portions of the message
   header.  Instead of displaying the encoded-word "as is", it will
   reverse the encoding and display the original text in the designated
   character set.

   An "encoded-word" is more precisely defined by the following EBNF
   grammar, using the notation of RFC 822:

   encoded-word = "=" "?" charset "?" encoding "?" encoded-text "?" "="

   charset = token    ; legal charsets defined by RFC 1341

   encoding = token   ; Either "B" or "Q"

   token = 1*

   tspecials = "(" / ")" / "" / "@" / "," / ";" / ":" / "\" /
                / "/" / "[" / "]" / "?" / "." / "="

   encoded-text = 1* (but see "Use of encoded-words in message
                  ; headers", below)




Moore