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

Re: [PATCH] CMIT_FMT_EMAIL: Q-encode Subject: and display-name part of From: fields.

From
Jakub Narebski <jnareb@gmail.com>
Date
May 16, 2006, 10:38 UTC
Message-ID
<e4ca2p$ud5$1@sea.gmane.org>
In-Reply-To
<7vmzdi9ssv.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano wrote:
Show 23 quoted lines
> By convention, the commit message and the author/committer names
> in the commit objects are UTF-8 encoded.  When formatting for
> e-mails, Q-encode them according to RFC 2047.
> 
> While we are at it, generate the content-type and
> content-transfer-encoding headers as well.
> 
> Signed-off-by: Junio C Hamano <junkio@cox.net>
> 
> ---
> 
>  With this patch, the output formatted with
> 
> git show --pretty=email --patch-with-stat 9d7f73d4
> 
>  would start like this:
> 
>    From 9d7f73d43fa49d0d2f5a8cfcce9d659e8ad2d265  Thu Apr 7 15:13:13 2005
>    From: =?utf-8?q?Lukas_Sandstr=C3=B6m?= <lukass@etek.chalmers.se>
>    Date: Sat, 25 Feb 2006 12:20:13 +0100
>    Subject: [PATCH] git-fetch: print the new and old ref when fast-forwarding 
>    Content-Type: text/plain; charset=UTF-8 
>    Content-Transfer-Encoding: 8bit
I guess that we also need
     
     MIME-Version: 1.0

(from what I remember of troubles with Eoutlook Express not sending all the required headers, and tin not working properly).

If I remember correctly encoding headers using quoted-printable is needed only because headers are before charset is set. IIRC there was proposal to use UTF-8 for headers regardless of the charset used for body of message.

P.S. Should we set User-Agent header as well?
-- 
Jakub Narebski
Warsaw, Poland
Previous: Junio C HamanoNext: Rocco Rutte
Message 2 of 3 in “CMIT_FMT_EMAIL: Q-encode Subject: and display-name part of From: fields.”
  1. CMIT_FMT_EMAIL: Q-encode Subject: and display-name part of From: fields.Junio C Hamano, May 16, 2006
  2. Jakub NarebskiMay 16, 2006
  3. Rocco RutteMay 16, 2006

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.