Re: [PATCH] ignores: handle non UTF-8 exclude files
- From
- Phillip 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