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

Re: git format-patch doesn't add Content-type for UTF-8 diffs

From
Torsten Bögershausen <tboegi@web.de>
Date
Jul 1, 2014, 04:38 UTC
Message-ID
<53B23B40.1070209@web.de>
In-Reply-To
<20140630173052.GB16747@sigill.intra.peff.net>
>I wonder if it would be enough to do:
Show 5 quoted lines
>  1. Always add a content-type header, even if the commit is utf-8 and
>     contains only ascii characters. This _shouldn't_ hurt anything,
>     though I suppose it would if you have latin1 (for example) commit
>     messages and did not correctly set the encoding header in your
>     commits.
Does it make sense to call this function (from utf8.c)
int is_utf8(const char *text)
and either add the content-type header for utf-8 (or not)
Previous: Paul Eggert
Message 4 of 4 in “git format-patch doesn't add Content-type for UTF-8 diffs”
  1. Paul EggertJun 30, 2014
  2. Jeff KingJun 30, 2014
  3. Paul EggertJun 30, 2014
  4. Torsten BögershausenJul 1, 2014

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.