Git Attribute: File Text Encoding {WAS: Re: [RFC] Print diffs of UTF-16 to console / patches to email as UTF-8...?}
- From
Drew Northup <drew.northup@maine.edu>
- Date
- Oct 22, 2010, 20:18 UTC
- Message-ID
- <1287778695.819.17.camel@drew-northup.unet.maine.edu>
- In-Reply-To
- <20101022195331.GA12014@burratino>
On Fri, 2010-10-22 at 14:53 -0500, Jonathan Nieder wrote:
> Joshua Juran wrote:
Show 16 quoted lines
> > 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...
-- -Drew Northup N1XIM AKA RvnPhnx on OPN ________________________________________________ "As opposed to vegetable or mineral error?" -John Pescatore, SANS NewsBites Vol. 12 Num. 59