MBOX-Line: From MRC at Washington.EDU  Tue Feb  5 12:13:56 2008
To: imap-protocol@u.washington.edu
From: Mark Crispin <MRC@Washington.EDU>
Date: Fri Jun  8 12:34:41 2018
Subject: [Imap-protocol] non-ASCII byte sequences in IMAP? 
In-Reply-To: <08Feb5.112141pst."58696"@synergy1.parc.xerox.com>
References: <"08Feb3. 133012pst. 58696"@synergy1.parc.xerox.com>
	<3/ZsgW8xag0zKO8asER9/Q.md5@libertango.oryx.com> <"08Feb5.
	091040pst. 58696"@synergy1.parc.xerox.com>
	<rr9fu1gL3aYp0C0eYZ33eQ.md5@libertango.oryx.com>
	<08Feb5.112141pst."58696"@synergy1.parc.xerox.com>
Message-ID: <alpine.WNT.1.00.0802051205510.3096@Tomobiki-Cho.CAC.Washignton.EDU>

On Tue, 5 Feb 2008, Bill Janssen wrote:
> Yes, I see what you mean.  The "userid" and "password" arguments to
> LOGIN are "astring", which can be "literal", which can be a sequence
> of "CHAR8" (a binary blob without zero octets in it).

The IMAP specification is being intentionally vague here.  It didn't want 
to say too much, for fear of having to have that be unsaid later.

The idea was to define things such as "userid" and "password" as ASCII; 
but (1) it was known a limitation to ASCII was going to be overturned, and 
(2) that limitation was not in any way enforced by the specification.

Otherwise they would have been atom or atom / quoted, since only atom or 
quoted is limited to ASCII.  But there is no such thing in IMAP.  You 
either find atom (which is a limited subset of ASCII) or astring (which 
can include non-ASCII via literals).

Now, here is where the IMAP specification is vague: the text about 
defining the charset leaves open the question of how, precisely, the 
charset is defined.  In some cases, you have charsets given via MIME.  In 
other cases, the means is left for future specification.  Or, the data can 
be binary blobs with no meaningful charset at all.

In my opinion, "userid" and "password" are binary blubs.  The convention 
seems to be that these blobs are UTF-8, replacing a previous convention 
that they are ASCII.

-- Mark --

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

