From: Linus Torvalds Date: Sun, 20 Nov 2005 03:10:53 GMT Subject: Re: Rss produced by git is not valid xml? Message-ID: In-Reply-To: On Sun, 20 Nov 2005, Johannes Schindelin wrote: > > On Sat, 19 Nov 2005, Linus Torvalds wrote: > > > > And text with 8-bit latin1 is almost never valid utf-8. > > I had the impression utf-8 was designed in a way so you could strike > "almost". But I don't have my docs handy... No, strange latin combinations will be valid utf-8. It needs to be some really strange text to be real latin1 but look like it might be utf-8, though. (In Finnish/Swedish, the letter 'ä' is code \x00E4, which in UTF-8 is the sequence \xA5\xC3. But you can't know if a text that has that sequence is UTF-8, or if it's a strange two-character latin1 sequence of "Ã¥" (character codes \x00A5 and \x00C3). But I can pretty much guarantee that most any _sane_ latin1 text will obviously not be UTF-8, so in _practice_ you can definitely tell the two apart. Linus