[Python-Dev] mUTF-7 support?
drsalists at gmail.com
Fri Oct 10 04:12:29 CEST 2014
On Thu, Oct 9, 2014 at 3:47 PM, Jesus Cea <jcea at jcea.es> wrote:
> I miss mUTF-7 support (as used to encode IMAP4 mailbox names) in Python,
> in the codecs module. As an european with a language with 27 different
> letters (instead of english 26), tildes, opening question marks, etc., I
> find it very inconvenient.
> This encoding is used basically only in IMAP4, I know. But IMAP4 is an
> important protocol and all projects related to it needs mUTF-7 support
> if they care about non-english alphabets. Everybody has already an
> implementation, waste of effort.
I've been parsing up a huge gmail account with no encoding errors,
using CPython 2.x and CPython 3.x. I'd be surprised if there are no
foreign characters in any of the thousands of messages there - but
maybe I'm just being very lucky. I'm not specifying a codec, and I
don't see a way of specifying one offhand.
Does email.header.decode_header help you?
More information about the Python-Dev