Problems parsing a email with 8-bit encoding

pyzmail high level mail library for Python

Problems parsing a email with 8-bit encoding

Postby tshaw » Wed Sep 13, 2017 10:56 pm

I am parse incoming mail and extracting information from the contents. I would like whatever the codepage/charset to be converted to utf-8 but it seems that I am having problems with char encoding of 8-bit as I am getting the following error:

You must not use 8-bit bytestrings unless you use a text_factory that can interpret 8-bit bytestrings (like text_factory = str). It is highly recommended that you instead just switch your application to Unicode strings.

An example is\xe8\x80\x83\xe6\xa0\xb8_1.html

Any help would be appreciated.
Posts: 1
Joined: Wed Sep 13, 2017 8:48 pm

Return to Python Easy Mail

Who is online

Users browsing this forum: No registered users and 1 guest