Skip to content
Snippets Groups Projects
Commit 4822eafa authored by Julien Van Roy's avatar Julien Van Roy
Browse files

[FIX] mail: UTF-8 text/xml attachment and omitted charset

When parsing an email containing an xml attachment, the `email` python
module will decode the base64 attachment using the charset or ascii if
the charset is missing.

In some cases, the payload is in UTF-8 but the charset is omitted. This
results in replacement characters for the non ASCII characters.

The solution is to force the charset to UTF-8, since it is a superset of
ASCII that should not be a problem.

NB1: Omitting the charset for text/xml is not recommended. See the RFC
(section 6.4): https://www.ietf.org/rfc/rfc2376.txt



opw-3144519

closes odoo/odoo#126392

X-original-commit: 3b489509
Signed-off-by: default avatarJulien Castiaux (juc) <juc@odoo.com>
Signed-off-by: default avatarJulien Van Roy (juvr) <juvr@odoo.com>
parent 703f03e0
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment