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

Re: Use of new .gitattributes working-tree-encoding attribute across different platform types

From
brian m. carlson <sandals@crustytoothpaste.net>
Date
Jul 1, 2018, 17:56 UTC
Message-ID
<20180701175657.GC7965@genre.crustytoothpaste.net>
In-Reply-To
<20180628172707.GA31766@sigill.intra.peff.net>
On Thu, Jun 28, 2018 at 01:27:07PM -0400, Jeff King wrote:
Show 10 quoted lines
> Yeah, that was along the lines that I was thinking. I wonder if anybody
> would ever need two such auto-encodings, though. Probably not. But
> another way to think about it would be to allow something like:
> 
>   working-tree-encoding=foo
> 
> and then in your config "foo" to map to some encoding.
> 
> But that may be over-engineering, I dunno. utf8 has always been enough
> for me. :)

I had a thought the other day about why this solution might be valuable. Different platforms encode different values for iconv character sets. So, for example, one may have platforms supporting some disjoint sets of the following:

* LATIN-1
* LATIN1
* ISO8859-1
* ISO-8859-1
* ISO_8859-1
* ISO_8859-1:1987
* some lowercase variants of these

Therefore, specifying a working-tree-encoding value that works across a wide variety of system may be non-trivial. This is less of a problem with UTF-8, but having the ability to pick an encoding and remap it to a supported value may be useful nevertheless.

-- 
brian m. carlson: Houston, Texas, US
OpenPGP: https://keybase.io/bk2204
Previous: Jeff KingNext: Jeff King
Message 7 of 12 in “Use of new .gitattributes working-tree-encoding attribute across different platform types”
  1. Steve GroegerJun 27, 2018
  2. Torsten BögershausenJun 27, 2018
  3. brian m. carlsonJun 28, 2018
  4. Jeff KingJun 28, 2018
  5. Lars SchneiderJun 28, 2018
  6. Jeff KingJun 28, 2018
  7. brian m. carlsonJul 1, 2018
  8. Jeff KingJul 2, 2018
  9. Junio C HamanoJul 3, 2018
  10. Steve GroegerJul 2, 2018
  11. Lars SchneiderJul 2, 2018
  12. Jeff KingJul 2, 2018

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.