with issues 4411 and 4771 closed, mime/multipart now supports decoding
quoted printable MIME parts, which is pretty nice. Issue 4771 was already
about making the parser more lenient to unescaped \r\n, and I wonder if
that is enough for dealing with "real life" emails. I have a couple of
emails which are announced as "quoted-printable" (and they are, for example
a link has its "href" encoded as href=3D"http://foo.bar"), however the
piece of code generating this email didn't take care of encoding stuff
outside the US-ASCII range, so I have chars like ä (0xE4 in ISO-8859-1)
which are unescaped.
So far, the parser chokes on them and spits an error, which is probably a
sane default. That said, I wouldn't mind having a way to tell the parser
that "it's OK, just let those bytes through". I used to use
https://github.com/sloonz/go-qprintable before 4411 got merged, and that
one didn't seem to mind those unescaped bytes.
My questions would then be:
- Does anyone has any idea of how one could control how emails get parsed?
I can't see an elegant way of doing that, apart from adding some kind of
flags on the parser
- Should we stick to a strict parser, is my only solution to duplicate the
whole net/mail and deps in my source tree, or is there a nicer alternative?
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firstname.lastname@example.org.
For more options, visit https://groups.google.com/groups/opt_out.