Re: GIT character codecs

From: Matthias Urlichs <smurf@smurf.noris.de>
Date: 2005-11-14 18:42:46
Hi,

Marco Costalba:
> >Or, if you want to be super-flexible, just try to decode as UTF-8.
> >Success? fine -- otherwise use whatever your application's default is
> >set to, or your local encoding (which may of course also be UTF-8), or
> >fall back to 8859-15.
> 
> How it is possible to test for success?

UTF-8 decoding does NOT always succeed.

In fact, there is no other 8-bit encoding which decodes as valid UTF-8,
given real-world text.

> The codec could see everything decodable, but It's only from the
> context, i.e. the user who reads, that it is possible to realize it's
> the wrong codec.  
> 
True in general, but not with UTF-8 (or ASCII, for that matter ;-).

-- 
Matthias Urlichs   |   {M:U} IT Design @ m-u-it.de   |  smurf@smurf.noris.de
Disclaimer: The quote was selected randomly. Really. | http://smurf.noris.de
 - -
You can fool the people about many things, but only a fool would be foolish
enough to fool the people about money.
					-- Italo Bombolini

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Received on Mon Nov 14 18:44:20 2005

This archive was generated by hypermail 2.1.8 : 2005-11-14 18:44:25 EST