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

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, 17:01 UTC
Message-ID
<1287766916.31218.71.camel@drew-northup.unet.maine.edu>
In-Reply-To
<20101022161851.GH9224@burratino>
On Fri, 2010-10-22 at 11:18 -0500, Jonathan Nieder wrote:
Show 14 quoted lines
> Hi,
> 
> Drew Northup wrote:
> 
> >         This is part of my ongoing work to treat UTF-16 as text (in
> > other words, the crlf options will work and .gitattributes hacks won't
> > be required to display diffs, etc).
> 
> What's wrong with .gitattributes for this use case?  I would think a
> clean/smudge filter would produce very good behavior from most git
> commands.
> 
> If speed is the issue, maybe a built-in clean/smudge filter would
> address that?

That still doesn't fix the crlf issue, for starters. Also, I would like to be able to email patches for files that are in UTF-16 and properly re-import them. Unless I'm missing something really big there's not much that a display filter is going to do for me there. I want this to be two-way. To be honest, the not needing of a display filter goes along with treating UTF-16 patches as text. The same sort of code will be required for both, so why not get predictable behavior for another text encoding at the same time?

-- 
-Drew Northup N1XIM
   AKA RvnPhnx on OPN
________________________________________________
"As opposed to vegetable or mineral error?"
-John Pescatore, SANS NewsBites Vol. 12 Num. 59
Previous: Jonathan NiederNext: Jonathan Nieder
Message 3 of 15 in “[RFC] Print diffs of UTF-16 to console / patches to email as UTF-8...?”
  1. Drew NorthupOct 22, 2010
  2. Jonathan NiederOct 22, 2010
  3. Drew NorthupOct 22, 2010
  4. Jonathan NiederOct 22, 2010
  5. Drew NorthupOct 22, 2010
  6. Jonathan NiederOct 22, 2010
  7. Jakub NarebskiOct 22, 2010
  8. Jakub NarebskiOct 22, 2010
  9. Drew NorthupOct 22, 2010
  10. Jakub NarebskiOct 22, 2010
  11. Joshua JuranOct 22, 2010
  12. Jeff KingOct 22, 2010
  13. Jonathan NiederOct 22, 2010
  14. Git Attribute: File Text Encoding {WAS: Re: [RFC] Print diffs of UTF-16 to console / patches to email as UTF-8...?}Drew Northup, Oct 22, 2010
  15. Jakub NarebskiOct 22, 2010

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.