I am displaying new email with IMAP, and everything looks fine, except for one message subject shows as:
IMAP
=?utf-8?Q?Subject?=
How ca
In MIME terminology, those encoded chunks are called encoded-words. You can decode them like this:
import email.Header text, encoding = email.Header.decode_header('=?utf-8?Q?Subject?=')[0]
Check out the docs for email.Header for more details.