Re: [PATCH] send-email: improve RFC2047 quote parsing
From: Thomas Rast <hidden>
Date: 2016-06-15 22:54:23
Junio C Hamano [off-list ref] writes:
Thomas Rast [off-list ref] writes:quoted
This patch fixes the first two by doing a more careful decoding of the =AB outer quoting. Fixing the fundamental issues is left for a future, more intrusive, patch.What is this =AB thing?
The two-hex-digits quoting in the style of MIME quoted-printable. I called it the "outer quoting" (RFC2047: "encoding") because it serves to protect the bytes from transport damage; there is another encoding (RFC2047: "character set") "inside" which is specified by the =?utf-8?...?= wrapper. BTW, note that we also only handle the Q outer quoting (quoted-printable). There is a B encoding, which your email in fact used in the Cc: header: Cc: [...] =?utf-8?B?SsO8cmdlbiBSw7xobGU=?= <redacted> B means Base64, as you can probably guess from the looks of it.
quoted
This is the easy part, fixed as per Junio's comment that it needs to use a .*? match for the contents, and with a test.What's the hard part? Do you mean the "fundamentally cannot" part?
Yes, and by "fundamentally" I meant "not without fixing something
outside of this function, which I am too lazy to do at this time". ;-)
--
Thomas Rast
trast@{inf,student}.ethz.ch