-
Notifications
You must be signed in to change notification settings - Fork 122
Open
Description
Hey there! 👋
I'm using go-message for an email archiving application and ran into a challenge with emails that have invalid encoding.
The problem happens in the encodingReader function (https://github.com/emersion/go-message/blob/master/encoding.go) when it encounters malformed content.
For example, this email snippet:
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML>
===
<html>
<body>
<p>Hello, World!</p>
<p>This has some =ZZ invalid quoted-printable stuff.</p>
<p>Another example: =</p>
<p>This text after the invalid parts never gets processed.</p>
</body>
</html>
The reader fails at the first invalid sequence, and we can't get any of the content.
For archiving purposes, I'd love an option to just get whatever content is available, even if some parts can't be decoded perfectly. I'm prioritizing content preservation over perfect rendering.
Maybe an option to skip encoding validation via Options?
Metadata
Metadata
Assignees
Labels
No labels