MBOX-Line: From mrc+imap at panda.com  Fri Jul  9 20:00:01 2010
To: imap-protocol@u.washington.edu
From: Mark Crispin <mrc+imap@panda.com>
Date: Fri Jun  8 12:34:45 2018
Subject: [Imap-protocol] folding/encoding of subject in ENVELOPE
In-Reply-To: <alpine.BSF.2.00.1007091831130.49338@legolas.orthanc.ca>
References: <4C37C781.5060700@sun.com>
	<FCB729DF-4574-4EA5-BA6C-B21F5B67B9D1@iki.fi>
	<alpine.BSF.2.00.1007091831130.49338@legolas.orthanc.ca>
Message-ID: <alpine.WNT.2.00.1007091852190.2580@Shimo-Tomobiki.Panda.COM>

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.

