diff --git a/alot/db/utils.py b/alot/db/utils.py index ea0963c1e..948861485 100644 --- a/alot/db/utils.py +++ b/alot/db/utils.py @@ -446,9 +446,9 @@ def remove_cte(part, as_string=False): sp = helper.try_decode(bp) except UnicodeDecodeError as emsg: # the mail contains chars that are not enc-encoded. - # try again and just ignore those + # libmagic works better than just ignoring those logging.debug('Decoding failure: {}'.format(emsg)) - sp = bp.decode(enc, errors='ignore') + sp = helper.try_decode(bp) return sp return bp diff --git a/tests/db/test_utils.py b/tests/db/test_utils.py index 7d54741f6..f62495427 100644 --- a/tests/db/test_utils.py +++ b/tests/db/test_utils.py @@ -711,7 +711,6 @@ def test_require_mailcap_file(self): self.assertEqual(actual, expected) - @unittest.expectedFailure def test_simple_utf8_file(self): mail = email.message_from_binary_file( open('tests/static/mail/utf8.eml', 'rb'))