[Imap-protocol] folding/encoding of subject in ENVELOPE
Timo Sirainen
tss at iki.fi
Fri Jul 9 20:15:43 PDT 2010
On 10.7.2010, at 4.00, Mark Crispin wrote:
> 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.
But it's not just the line folding. All LWSP containing tabs, spaces and CRLFs are converted into a single space by many servers (IIRC also UW-IMAP). RFC 822 says that all LWSP is equivalent to a single space in structured fields, but subject is unstructured field.
> Arguably, a future version of IMAP should decode MIME encoded-words into
> UTF-8.
I'm looking forward to RFC 5738bis.
More information about the Imap-protocol
mailing list