Subject: use base64 instead of quoted-printable in format-patch headers (was Re: Make format-patch produce UTF-8 `From:' header)

From: Štěpán Němec <[email-masked]>
Date: Mon, 20 Sep 2010 14:20:40 +0200

Russ Allbery <[email-masked]> writes:

> Štěpán Němec <[email-masked]> writes:
>> Jonathan Nieder <[email-masked]> writes:
>
>>> Maybe format-patch could provide another mode to produce patches that
>>> do not include unnecessary headers (in particular, leaving out the
>>> difficult "From " line and using UTF-8 instead of quoted-printable for
>>> the "From: " line).
>
>> FWIW, the quoted-printable `From:' encoding has always annoyed me -- I
>> replace it manually with my name & address in UTF-8 every time I send
>> out a patch. What is the reason format-patch does that (and if there is
>> a reason not to change the default, could an option to disable it be
>> provided)?
>
> Well, it's required if you're going to actually send the result directly
> as a mail message, since the RFC 5322 format requires headers be encoded
> using RFC 2047 encoding.

Right... thanks for pointing that out. So the problem I'm seeing is
actually different -- some software (including Mutt and the mailing
list/archive software used by this list) appears to have problems with
quoted-printable, but not with base64.

To take my name as example: when I send mail from Mutt, it is encoded as
"=?utf-8?B?xaB0xJtww6FuIE7Em21lYw==?=", i.e. base64, and both Mutt and
the vger archive seem to decode it properly, whereas the
quoted-printable version produced by fromat-patch, i.e.
"=?utf-8?q?=C5=A0t=C4=9Bp=C3=A1n=20N=C4=9Bmec?=" in this case, is left
undecoded by Mutt and mis-decoded in the ML archive as far as I have
seen. I'm not sure about other software (Gnus seems to be able to deal
with both correctly), but perhaps it would make sense to switch to
base64 in format-patch?

Štěpán