[Imap-protocol] folding/encoding of subject in ENVELOPE

Mark Crispin mrc+imap at panda.com
Fri Jul 9 20:00:01 PDT 2010


On Fri, 9 Jul 2010, Lyndon Nerenberg wrote:

>> Yes, but my server (and many others) are converting all whitespace to a

>> single space (tabs, folds, multiple spaces, etc). I can't exactly

>> remember why, though. Maybe I implemented it only because others did

>> that too..

> The '822 <FWS> grammar production.


Correct. You interpret the fields as per RFC 822 (etc.).

Line folding is an RFC 822 (etc.) concept and is not part of the field
data (e.g., Subject). Header fields are logically a single line, even if
they are multiple lines in the header.

If you think about it and how protocol layering works, it makes sense.
You are looking at a message and its fields, not how RFC 822 (etc.)
encodes it.

Arguably, a future version of IMAP should decode MIME encoded-words into
UTF-8.

-- Mark --

http://panda.com/mrc
Science does not emerge from voting, party politics, or public debate.
Si vis pacem, para bellum.


More information about the Imap-protocol mailing list