Trying to get an email with impalib, getting encoding problem: special characters show up as UTF-8 hex code

I'm trying to get an email and then parse with beautifulsoup, but I keep running into this problem: Special characters are shown as their hex code, ! changes to =21 , ® changes to =C2=AE. How do I fix this? This is the code I used:

m = imaplib.IMAP4_SSL('')
m.login('usename', 'pw')'Orders', readonly=True)

resp, data =, "ALL")

messages = data[0].split()

for item in messages:
    resp, data = m.fetch(item,'(RFC822)')
    raw_email = data[0][1].decode(utf-8)
    soup = bs4.BeautifulSoup(raw_email,'lxml')