flanker icon indicating copy to clipboard operation
flanker copied to clipboard

Errors in encoding

Open goors opened this issue 10 years ago • 0 comments

I am getting errors for:

if msg.content_type.is_multipart():
            for part in msg.parts:
                print 'Content-Type: {} Body: {}'.format(part, part.body)

This is error:

UnicodeEncodeError: 'ascii' codec can't encode character u'\u017e' in position 159: ordinal not in range(128)

It looks like your library is only working for use characters. That sucks.

Here are few chars: ka=BEem, prili=E8no in raw email.

goors avatar Dec 05 '14 21:12 goors