From: Jakub Narebski <jnareb@gmail.com>
To: Drew Northup <drew.northup@maine.edu>
Cc: Jonathan Nieder <jrnieder@gmail.com>,
Joshua Juran <jjuran@gmail.com>,
Git mailing list <git@vger.kernel.org>,
Junio C Hamano <gitster@pobox.com>, Jeff King <peff@peff.net>
Subject: Re: Git Attribute: File Text Encoding {WAS: Re: [RFC] Print diffs of UTF-16 to console / patches to email as UTF-8...?}
Date: Fri, 22 Oct 2010 14:49:20 -0700 (PDT) [thread overview]
Message-ID: <m3sjzxkifz.fsf@localhost.localdomain> (raw)
In-Reply-To: <1287778695.819.17.camel@drew-northup.unet.maine.edu>
Drew Northup <drew.northup@maine.edu> writes:
> On Fri, 2010-10-22 at 14:53 -0500, Jonathan Nieder wrote:
> > Joshua Juran wrote:
>
> > > But a more
> > > complete and robust solution would be to store the encoding
> > > somewhere, possibly in the blob itself, or in the tree storing the
> > > filename.
> >
> > How about Jakub's idea of keeping it in .gitattributes (or some
> > similarly visible key/value store)? Two reasons:
> >
> > 1. When asked to declare encoding, half the time people will be
> > wrong. So it seems worthwhile to make the declared encoding
> > visible enough to fix.
> >
> > 2. Two ASCII files identical except that one is declared as
> > latin1 and the other utf8 should be considered identical.
> >
> > Thanks for some food for thought.
>
> I think that's a fine place to start. Shall I start a branch for it when
> I get home (where the code I'm working on is located)? It would be good
> practice if nothing else...
Just for clarification: Git supports and uses `encoding` gitattribute,
but it is used currently _only_ bu git-gui (by converting from `encoding`
gitattribute to `git.encoding` given by config).
The places that are missing:
1. A way to check attribute of a file in given tree. Currently
git-check-attr checks for .gitattributes _only_ from working
area (in addition to unversioned .git/info/attributes, and perhaps
in the future core.attributesFile a la core.excludesFile).
2. A consensus where conversion should take place: at which level
in stack, for what output destination, etc.
3. Support for i18n.blobOutputEncoding, which would convert (unless
overriden) e.g. in 'git show <blob>', and perhaps also in diff.
--
Jakub Narebski
Poland
ShadeHawk on #git
prev parent reply other threads:[~2010-10-22 21:49 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-22 16:06 [RFC] Print diffs of UTF-16 to console / patches to email as UTF-8...? Drew Northup
2010-10-22 16:18 ` Jonathan Nieder
2010-10-22 17:01 ` Drew Northup
2010-10-22 17:12 ` Jonathan Nieder
2010-10-22 17:27 ` Drew Northup
2010-10-22 17:30 ` Jonathan Nieder
2010-10-22 17:58 ` Jakub Narebski
2010-10-22 17:48 ` Jakub Narebski
2010-10-22 18:06 ` Drew Northup
2010-10-22 19:18 ` Jakub Narebski
2010-10-22 18:28 ` Joshua Juran
2010-10-22 19:13 ` Jeff King
2010-10-22 19:53 ` Jonathan Nieder
2010-10-22 20:18 ` Git Attribute: File Text Encoding {WAS: Re: [RFC] Print diffs of UTF-16 to console / patches to email as UTF-8...?} Drew Northup
2010-10-22 21:49 ` Jakub Narebski [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=m3sjzxkifz.fsf@localhost.localdomain \
--to=jnareb@gmail.com \
--cc=drew.northup@maine.edu \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jjuran@gmail.com \
--cc=jrnieder@gmail.com \
--cc=peff@peff.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.