I am using Python's imaplib
module, specifically the IMAP4_SSL
class to get emails from a server.
When I download messages, non-unicode characters are usually escaped as quoted printable escape codes for which I use the quopri
module.
When I use the list
method of the IMAP4_SSL
object however, non-ascii characters are escaped as <ampersand> some three letter code <dash>
, which looks like this:
(\HasNoChildren) "/" "Lib&AOk-rations/Lib&AOk-ration Bilan"
(\HasNoChildren) "/" "Poly/Comite&AwE- de discipline e&AwE-tudiante"
I have never seen this way of escaping characters before, and I can't find it anywhere because I don't know what it's called and search engines keep ignoring the "&" in my queries (I've tried quotes and I get the same results).