pazz/alot — Issue #107: charset=unknown crashes alot
Author: teythoon
Created: 2011-10-21 07:24:18+00:00
State: open

I got a mail that with a funny content type:

```
Content-Type: text/plain; charset=unknown
```

But it crashes alot, since the charset is being passed to the unicode function:

```
File "/home/teythoon/repos/alot/alot/buffers.py", line 253, in unfold_matching
mw.fold(visible=True)
File "/home/teythoon/repos/alot/alot/widgets.py", line 419, in fold
bw = self._get_body_widget()
File "/home/teythoon/repos/alot/alot/widgets.py", line 388, in _get_body_widget
cols = [MessageBodyWidget(self.message.get_email())]
File "/home/teythoon/repos/alot/alot/widgets.py", line 551, in __init__
bodytxt = message.extract_body(msg).replace('\t', ' ' * tab_width)
File "/home/teythoon/repos/alot/alot/message.py", line 186, in extract_body
raw_payload = unicode(raw_payload, enc, errors='replace')
LookupError: unknown encoding: unknown
```