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

Re: a bug about format-patch of multibyte characters comment

From
Jeff King <peff@peff.net>
Date
Feb 13, 2011, 10:03 UTC
Message-ID
<20110213100349.GA5483@sigill.intra.peff.net>
In-Reply-To
<201102131048.58111.j6t@kdbg.org>
On Sun, Feb 13, 2011 at 10:48:58AM +0100, Johannes Sixt wrote:
Show 13 quoted lines
> On Sonntag, 13. Februar 2011, Jeff King wrote:
> > On Sat, Feb 12, 2011 at 07:13:15PM +0900, xiaozhu wrote:
> > > Subject: [PATCH]
> > > =?UTF-8?q?=E6=97=A5=E6=9C=AC=E8=AA=9E=E3=81=8C=E5=A4=A7=E4=B8=88=E5=A4=AB
> > > =20=E6=94=B9=E8=A1=8C=E3=81=99=E3=82=8B?=
> >
> > Yeah, this is wrong. There should be a whitespace indentation in a
> > multi-line header, or the whole thing should be on one line. The newline
> > in your commit subject is apparently leaking through, and it should be
> > qp-encoded.
> 
> Isn't it wrong that format-patch (and --pretty=email) does any quoting in the 
> first place? Isn't it the task of the MUA (git-send-email) to do the quoting?

I dunno. I guess it depends on how you view the output of format-patch. Is it an mbox containing rfc2822-valid messages? Then it ought to be quoted.

Certainly when opening the output in an editor, it is prettier to have it unquoted. But what do MUAs expect when opening such an mbox? mutt seems to handle unencoded utf8 just fine, but I don't know about other MUAs.

Show 11 quoted lines
> For example, when I import a format-patch generated patch into a mail message, 
> I don't want to see:
> 
>  From: =?UTF-8?q?Joh=C3=A4nnes=20S=C3=BCxt?= <me@localhost>
> 
> but rather:
> 
>  From: Johännes Süxt <me@localhost>
> 
> I know this is a bit late, but this really comes as a surprise. (I've never 
> had to pay attention to this behavior in the past...)

I can see how that would be annoying if your workflow is to paste format-patch output into an email. But it has been that way literally for years (I just tried v1.5.0, and format-patch produces rfc2047-encoded headers). So yes, you are a bit late. :)

-Peff
Previous: Johannes Sixt
Message 13 of 13 in “a bug about format-patch of multibyte characters comment”
  1. xiaozhuFeb 12, 2011
  2. Martin KrügerFeb 12, 2011
  3. Jeff KingFeb 13, 2011
  4. Jeff KingFeb 13, 2011
  5. xiaozhuFeb 13, 2011
  6. Jeff KingFeb 13, 2011
  7. xiaozhuFeb 13, 2011
  8. xzerFeb 13, 2011
  9. Jeff KingFeb 13, 2011
  10. xiaozhuFeb 13, 2011
  11. Jeff KingFeb 13, 2011
  12. Johannes SixtFeb 13, 2011
  13. Jeff KingFeb 13, 2011

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.