MBOX-Line: From dave at cridland.net  Mon Feb  4 00:59:23 2008
To: imap-protocol@u.washington.edu
From: Dave Cridland <dave@cridland.net>
Date: Fri Jun  8 12:34:41 2018
Subject: [Imap-protocol] non-ASCII byte sequences in IMAP? 
In-Reply-To: <08Feb3.150115pst."58696"@synergy1.parc.xerox.com>
References: <08Feb3.133012pst."58696"@synergy1.parc.xerox.com>
	<alpine.OSX.1.00.0802031403290.16772@pangtzu.panda.com>
	<08Feb3.150115pst."58696"@synergy1.parc.xerox.com>
Message-ID: <8737.1202115563.136078@peirce.dave.cridland.net>

On Sun Feb  3 15:01:07 2008, Bill Janssen wrote:
> > However, if I were you, I would NOT make any ASCII assumptions in  
> a new > implementation.  Implement with the assumption that ALL  
> strings are UTF-8 > by default, but that for the time being you can  
> only send ASCII except in > the defined circumstances you mentioned  
> above.
> 
> Thanks.  Actually, at the moment, I'm looking at Python's imaplib
> client-side library.  Python, in the move to the next major version,
> is adding an explicit sequence-of-bytes type (instead of the 8-bit
> string type it previously used), and I'm looking at how to do
> appropriate bytes-to-string conversions in data read from the wire.
> 
> I think that explicitly using ASCII where the spec calls for it, and
> raising errors for incorrect non-ASCII codings, will result in fewer
> subtle bugs in programs that use this client library.
> 
> 
FWIW, I'm doing similar work in my Python IMAP client library, part  
of my IPL. There might be a teeny bit of bias, here, but I'd  
recommend looking at that rather than Python's IMAP library if you  
need a Python IMAP library. It could do with some more input to it,  
but it's a pretty solid base at the least.


> > In particular, UTF-8 mailbox names will probably happen sooner  
> rather than > later.
> 
> Fine, but that will be an extension.  I imagine there's some
> discussion of using standard RFC 2231 mail header charset quoting  
> when
> transferring such mailbox names across the wire?

IMAP already has a convention using a modified UTF-7. (Which IPL  
understands natively, and shields the calling application from, as  
well as shielding the calling application from namespace and  
delimiter differences).

Dave.
-- 
Dave Cridland - mailto:dave@cridland.net - xmpp:dwd@jabber.org
  - acap://acap.dave.cridland.net/byowner/user/dwd/bookmarks/
  - http://dave.cridland.net/
Infotrope Polymer - ACAP, IMAP, ESMTP, and Lemonade

