RFC 2047 / START HERE
Email encoded words, before the details
MIME means Multipurpose Internet Mail Extensions. RFC2047 describes encoded words for email header text.
An encoded word carries readable text through ASCII-oriented headers by naming a character set and a byte encoding. A supporting mail reader turns it back into text for display.
The idea in one picture
Compose text
Encode a word
Display text
A simplified picture of the idea; the chapters explain the actual mechanisms.
Why it exists
A Subject or display name may need accents and other non-ASCII characters. This publication defines where and how header words work; MIME body encoding and later direct UTF-8 headers are separate mechanisms.
A familiar example
A fictional Subject can contain =?UTF-8?Q?caf=C3=A9?= and display café in a supporting reader. Those bytes encode text, not a mailbox address or proof of who sent the message.
Helpful background
You can start here without reading another RFC. If these ideas are unfamiliar, these short introductions may help.
What you’ll learn next
Begin with chapter one, or choose a topic.
- Read the encoded-word wrapperAn encoded word packages a character set, a byte encoding and text into printable ASCII. It lets a compatible mail reader display non-ASCII header text.→
- Compare Q and B byte encodingsQ and B encode bytes, not abstract letters. Q favors recognizable ASCII text; B uses the same Base64 encoding as MIME bodies.→
- Decode only in allowed header locationsA recognizable wrapper is not permission to decode it everywhere. Header grammar decides which portions can contain encoded words.→
- Split long text at complete character boundariesA long header may use several encoded words, but each word must stand alone. Wrapper length, line length, byte escapes and character boundaries are separate checks.→
- Display text without changing header structureDecode recognized words for display after parsing the structured header. Whitespace joining and error recovery must preserve the surrounding message.→
This introduction explains RFC 2047 (1996). Read the original RFC ↗