From: "Torsten Bögershausen" <tboegi@web.de>
To: "brian m. carlson" <sandals@crustytoothpaste.net>,
"Michael Litwak" <michael.litwak@nuix.com>,
"Matthias Aßhauer" <mha1993@live.de>,
"git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: Suggested clarification for .gitattributes reference documentation
Date: Tue, 16 Jan 2024 18:44:00 +0100 [thread overview]
Message-ID: <20240116174400.GA2353@tb-raspi4> (raw)
In-Reply-To: <ZaXkt715TjNpuprG@tapette.crustytoothpaste.net>
On Tue, Jan 16, 2024 at 02:06:47AM +0000, brian m. carlson wrote:
> On 2024-01-16 at 00:19:20, Michael Litwak wrote:
> > As for documentation clarifications for the .gitattributes manpage at
> > https://git-scm.com/docs/gitattributes, I still suggest adding an
> > explicit example for UTF-16LE with BOM, and/or adding a table listing
> > which working-tree-encoding value to use for each of the following
> > UTF-16 text encodings:
> >
> > ENCODING 'working-tree-encoding' VALUE
> > ------------------- -----------------------------
> > UTF-16LE with BOM UTF-16LE-BOM
>
> I should point out that this encoding, while very common on Windows, is
> also nonstandard.
In general, I agree with everything that is snipped, thanks for the ong wordings.
[]
> (Apparently Emacs, which is not on my system, may
> permit that, which does not surprise me in the least.)
emacs seems to handle UTF-16LE-BOM just fine.
>
> > UTF-16BE with BOM UTF-16
>
[]
> I think the addition of this table is too much. UTF-16LE-BOM is common
> on Windows, and the rest are substantially less common. It's also very
> difficult to explain in a table what "UTF-16" means in an understandable
> way. And I also think it's also pretty clear that users should be using
> UTF-8 without BOM where possible.
>
> We do already mention both UTF-16, UTF-16LE, and UTF-16LE-BOM as options
> in the gitattributes manual page, and it's up to the user to know what
> their program wants and supports if that's not UTF-8.
What exactly is missing in the documentation ?
Could you please try to send us a diff (or even better a patch), so
that we can get an idea, of what can be improved ?
From my reading UTF-16LE-BOM is already mentioned.
It would be nice to see (from a user), what is probably missing.
> > Finally, I am not sure how to use git add --renormalize to correct a
> > UTF-16 file that was previously added incorrectly (i.e. with a missing
> > or incorrect working-tree-encoding entry in .gitattributes). The git
> > add documentation at https://git-scm.com/docs/git-add implies
> > 'renormalize' resets only the end-of-line values; however, I suspect
> > it also re-converts text encoding when a working-tree-encoding
> > property is set. It would be helpful to know one way or the other.
>
> It does indeed affect the working-tree-encoding. If you wanted to send
> an inline patch created with git format-patch, it would probably be
> welcome to mention that. However, because in this project we typically
> scratch our own itch, if you don't send one, it's likely nobody else
> will, either.
For the record: It will even run the "clean" filter, if it has changed,
or being freshly enabled.
So yes, a patch would be appreciated.
Thanks for bringing this up.
prev parent reply other threads:[~2024-01-16 17:44 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-12 21:25 Suggested clarification for .gitattributes reference documentation Michael Litwak
2024-01-12 21:50 ` brian m. carlson
2024-01-12 22:36 ` Michael Litwak
2024-01-13 2:56 ` Michael Litwak
2024-01-13 7:43 ` Torsten Bögershausen
2024-01-13 9:24 ` Matthias Aßhauer
2024-02-18 23:12 ` Johannes Schindelin
2024-01-16 0:19 ` Michael Litwak
2024-01-16 2:06 ` brian m. carlson
2024-01-16 17:44 ` Torsten Bögershausen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240116174400.GA2353@tb-raspi4 \
--to=tboegi@web.de \
--cc=git@vger.kernel.org \
--cc=mha1993@live.de \
--cc=michael.litwak@nuix.com \
--cc=sandals@crustytoothpaste.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).