From 73675b17b96d1dff7498fcff35abb5a481263fd0 Mon Sep 17 00:00:00 2001 From: Sean Whalen Date: Tue, 16 Jul 2019 22:36:28 -0400 Subject: [PATCH] More message parsing fixes --- parsedmarc/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parsedmarc/__init__.py b/parsedmarc/__init__.py index d6b242c..aaa05f3 100644 --- a/parsedmarc/__init__.py +++ b/parsedmarc/__init__.py @@ -687,7 +687,7 @@ def parse_report_email(input_, nameservers=None, dns_timeout=2.0, if is_outlook_msg(input_): input_ = convert_outlook_msg(input_) if type(input_) == bytes: - input_ = input_.decode(encoding="utf8", errors="ignore") + input_ = input_.decode(encoding="utf8", errors="replace") msg = mailparser.parse_from_string(input_) msg_headers = json.loads(msg.headers_json) date = email.utils.format_datetime(datetime.utcnow())