git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC] Print diffs of UTF-16 to console / patches to email as UTF-8...?
@ 2010-10-22 16:06 Drew Northup
  2010-10-22 16:18 ` Jonathan Nieder
  0 siblings, 1 reply; 15+ messages in thread
From: Drew Northup @ 2010-10-22 16:06 UTC (permalink / raw)
  To: Git mailing list; +Cc: Junio C Hamano

I am currently thinking about what the best way to preset readable (and
safely email-able) patches to the user may be when the content is
UTF-16. 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).
I was also concerned that the result be re-importable to valid UTF-16 in
the end. This has led me to consider printing diffs as UTF-8 (no data
loss, at least 16->8) when the source text is UTF-16. This should also
be git-gui / gitk friendly (in theory). I would favorably consider this
as a configurable option (export_unicode_diff_as_utf8 ?) leaving plain
UTF-16 output as the standard output from "git diff" (once I convince it
that UTF-16 is indeed text).
Also, there is the issue of being able to recognize UTF-16 as UTF-16 in
diffs/patches. Is there a precedent/standard I should be aware of with
respect to BOMs and patches? I would think that adhering to the UTF-16
standard with respect to whole text files would make sense here (no BOM
== Big Endian, BOM used to match LE/BE otherwise).

Comments welcome!

-- 
-Drew Northup N1XIM
   AKA RvnPhnx on OPN
________________________________________________
"As opposed to vegetable or mineral error?"
-John Pescatore, SANS NewsBites Vol. 12 Num. 59

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2010-10-22 21:49 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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).