martinrusev / imbox

Python IMAP for Human beings
MIT License
1.18k stars 190 forks source link

Problems with German "Umlaut" #149

Open pycebs opened 6 years ago

pycebs commented 6 years ago

I'm experiencing (encoding) problems with the German "Umlaut".

Example: "Deleted" in German means "Gelöscht". The "ö" is a so called "Umlaut".

So when I list all folders I get this:

(\Trash \HasNoChildren) "/" Gel&APY-scht

But I should be getting:

(\Trash \HasNoChildren) "/" Gelöscht

I looked into it and apparently the IMAP protocol encodes text in "utf-7". But even if I use:

xxx.decode("utf-7")

I still get:

(\Trash \HasNoChildren) "/" Gel&APY-scht

Is this a bug or is the error on my side?

karolzlot commented 5 years ago

Try to use this: .encode('utf-7')