git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
BCBrandon Casey <brandon.casey.ctr@nrlssc.navy.mil>
Date
Sep 20, 2010, 15:29 UTC
Message-ID
<ml4g8cZKMzCEccW79LHWosmZo3sz8RXCtZnyPWJ59xPTtblrKv8xLQ@cipher.nrlssc.navy.mil>
In-Reply-To
<AANLkTim-vfrxGbdfXeef81uP29NSSzutHbs-yhhQtiA8@mail.gmail.com>
On 09/20/2010 08:46 AM, Ævar Arnfjörð Bjarmason wrote:
Show 47 quoted lines
> On Mon, Sep 20, 2010 at 12:20, Štěpán Němec <stepnem@gmail.com> wrote:
>> Russ Allbery <rra@debian.org> writes:
>>
>>> Štěpán Němec <stepnem@gmail.com> writes:
>>>> Jonathan Nieder <jrnieder@gmail.com> 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?
> 
> The advantage of quoted-printable is the printable part. It's at least
> somewhat human readable, e.g.:
> 
>     =?UTF-8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?=
> 
> I have some chance of spotting a typo or something in there if I look
> at the raw E-Mail (which I often do), but not with base64.
> 
> Are we sure we're correctly encoding quoted-printable? E.g. maybe
> ?UTF-8? instead of ?utf-8? would work? It seems odd that a widely used
> client like Mutt would screw up such a widely used encoding.

I don't think we should be producing lower-case utf-8 anymore, since 1.6.4 I think.

I have encountered platforms, like older Solaris or IRIX, that indeed did not understand utf-8, but did understand UTF-8. So, it is something to check out. Perhaps Mutt or the mailing list archive were running on such a system?

-Brandon
Previous: Ævar Arnfjörð BjarmasonNext: Štěpán Němec
Message 8 of 10 in “Re: git am should recognize >From”
  1. Jonathan NiederSep 19, 2010
  2. Jonathan NiederSep 19, 2010
  3. Russ AllberySep 19, 2010
  4. Make format-patch produce UTF-8 `From:' header (was Re: git am should recognize >From)Štěpán Němec, Sep 19, 2010
  5. Russ AllberySep 19, 2010
  6. use base64 instead of quoted-printable in format-patch headers (was Re: Make format-patch produce UTF-8 `From:' header)Štěpán Němec, Sep 20, 2010
  7. Ævar Arnfjörð BjarmasonSep 20, 2010
  8. Brandon CaseySep 20, 2010
  9. Štěpán NěmecSep 20, 2010
  10. Erik Faye-LundSep 19, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.