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

Re: [PATCH] ignores: handle non UTF-8 exclude files

From
PWPhillip Wood <phillip.wood123@gmail.com>
Date
Jan 7, 2026, 14:36 UTC
Message-ID
<072dc5ef-e750-4023-bf6c-30b4b143beca@gmail.com>
In-Reply-To
<CALH9GrYi0dYo4LJg8ww1cDOETiOT44m0zQgkxLsxqEuMmv_myQ@mail.gmail.com>
On 06/01/2026 20:32, Matthieu Beauchamp wrote:
Show 5 quoted lines
> 
> Yes you are correct, but I want to address the issues for users who may not
> realize that they used the wrong encoding when creating their exclude file.
> For that case I don't see how the fact that powershell can be configured to
> UTF-8 helps, aside from preventing repeating the same mistake.

My concern with that is that it ends up hampering collaboration with people using bash on Windows or a native shell on other platforms. If they append to a UTF-16 encoded .gitignore with "echo path >>.gitignore" you'll end up with a mix of encodings in the same file. Similarly if you use powershell to append to an existing file that is UTF-8 encoded with "echo hello >>.gitignore" is the appended text UTF-16 encoded resulting in mixed encodings in the same file?

Thanks
Phillip
Previous: Matthieu BeauchampNext: brian m. carlson
Message 6 of 13 in “ignores: handle non UTF-8 exclude files”
  1. ignores: handle non UTF-8 exclude filesMatthieu Beauchamp-Boulay via GitGitGadget, Jan 3, 2026
  2. Junio C HamanoJan 4, 2026
  3. Matthieu BeauchampJan 6, 2026
  4. Torsten BögershausenJan 4, 2026
  5. Matthieu BeauchampJan 6, 2026
  6. Phillip WoodJan 7, 2026
  7. brian m. carlsonJan 4, 2026
  8. Matthieu BeauchampJan 6, 2026
  9. brian m. carlsonJan 6, 2026
  10. Collin FunkJan 7, 2026
  11. Phillip WoodJan 7, 2026
  12. brian m. carlsonJan 7, 2026
  13. Collin FunkJan 8, 2026

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.