Re: [PATCH] send-email: improve RFC2047 quote parsing
- From
Thomas Rast <trast@student.ethz.ch>
- Date
- Jul 31, 2012, 08:09 UTC
- Message-ID
- <87lii0gxni.fsf@thomas.inf.ethz.ch>
- In-Reply-To
- <7vzk6hot8a.fsf@alter.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
Show 7 quoted lines
> Thomas Rast <trast@student.ethz.ch> writes: > >> 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=?= <j-r@online.de>
B means Base64, as you can probably guess from the looks of it.
>> 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