{"comment":{"created_at":"2011-10-23T08:35:00Z","body":"Yes, thanks.","updated_at":"2011-10-23T08:35:00Z","url":"https://api.github.com/repos/pazz/alot/issues/comments/2494501","id":2494501,"user":{"gravatar_id":"5e029b5f8ae11f4cb11d42ef1d13d8c6","avatar_url":"https://secure.gravatar.com/avatar/5e029b5f8ae11f4cb11d42ef1d13d8c6?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/teythoon","id":469398,"login":"teythoon"}},"action":"created","issue":{"number":107,"created_at":"2011-10-21T07:24:18Z","pull_request":{"diff_url":null,"patch_url":null,"html_url":null},"body":"I got a mail that with a funny content type:\r\n\r\n```\r\nContent-Type: text/plain; charset=unknown\r\n```\r\n\r\nBut it crashes alot, since the charset is being passed to the unicode function:\r\n\r\n```\r\n  File \"/home/teythoon/repos/alot/alot/buffers.py\", line 253, in unfold_matching\r\n    mw.fold(visible=True)\r\n  File \"/home/teythoon/repos/alot/alot/widgets.py\", line 419, in fold\r\n    bw = self._get_body_widget()\r\n  File \"/home/teythoon/repos/alot/alot/widgets.py\", line 388, in _get_body_widget\r\n    cols = [MessageBodyWidget(self.message.get_email())]\r\n  File \"/home/teythoon/repos/alot/alot/widgets.py\", line 551, in __init__\r\n    bodytxt = message.extract_body(msg).replace('\\t', ' ' * tab_width)\r\n  File \"/home/teythoon/repos/alot/alot/message.py\", line 186, in extract_body\r\n    raw_payload = unicode(raw_payload, enc, errors='replace')\r\nLookupError: unknown encoding: unknown\r\n```","comments":5,"title":"charset=unknown crashes alot","updated_at":"2011-10-23T08:35:00Z","url":"https://api.github.com/repos/pazz/alot/issues/107","id":2012972,"assignee":null,"milestone":null,"closed_at":"2011-10-23T08:35:00Z","user":{"gravatar_id":"5e029b5f8ae11f4cb11d42ef1d13d8c6","avatar_url":"https://secure.gravatar.com/avatar/5e029b5f8ae11f4cb11d42ef1d13d8c6?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/teythoon","id":469398,"login":"teythoon"},"html_url":"https://github.com/pazz/alot/issues/107","labels":[{"name":"bug","url":"https://api.github.com/repos/pazz/alot/labels/bug","color":"e10c02"}],"state":"closed"},"legacy":{"issue_id":2012972,"comment_id":2494501}}