Thread (34 messages) flat view 34 messages, 7 authors, 2016-06-15

Re: Rss produced by git is not valid xml?

From: "H. Peter Anvin" <hpa@zytor.com>
Date: 2016-06-15 22:42:12

Linus Torvalds wrote:
It's easy to say "just do the right thing", and ignore reality.

git commit logs have always been "8-bit data". It's actually gitweb that 
is buggy if it claims it is UTF-8 without checking or converting it to 
such.

I agree that UTF-8 is a good idea, but that's a totally different 
argument.
I think the point is: what do you do with the data?  If it *looks* like 
valid UTF-8, you pretty much have to assume it is; if it's not (it 
contains invalid UTF-8 sequences), what do you do?  There are only a 
small handful of alternatives, and none are really good:

	- Reject it (it's kind of too late, should have been done at
	  checkin)
	- Show them as SUBSTITUTE characters (U+FFFD).
	- Show them as Latin-1 or Windows-1252
	- Provide a complex configuration mechanism

I think Kay is going with the second option.

Note this problem always exists for the data contents anyway.  We can't 
do anything about that.

What's probably more important is that tools that rely on email or other 
outside data sources (like CVS) do the necessary conversions, so one 
doesn't end up with an inadvertently incorrect repository.

	-hpa
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help