Re: [PATCH 2/4] Do attempt pretty print in ASCII-incompatible encodings
- From
Jeff King <peff@peff.net>
- Date
- Feb 21, 2012, 18:21 UTC
- Message-ID
- <20120221182118.GA32668@sigill.intra.peff.net>
- In-Reply-To
- <1329834292-2511-2-git-send-email-pclouds@gmail.com>
On Tue, Feb 21, 2012 at 09:24:50PM +0700, Nguyen Thai Ngoc Duy wrote:
Show 9 quoted lines
> We rely on ASCII everywhere. We print "\n" directly without conversion > for example. The end result would be a mix of some encoding and ASCII > if they are incompatible. Do not do that. > > In theory we could convert everything to utf-8 as intermediate medium, > process process process, then convert final output to the desired > encoding. But that's a lot of work (unless we have a pager-like > converter) with little real use. Users can just pipe everything to > iconv instead.
I'm not sure why we bother checking this. Using non-ASCII-superset encodings is broken, yes, but are people actually doing that? I assume that the common one is utf-16, and anybody using it will experience severe breakage immediately. So are people actually doing this? Are there actually encodings that will cause subtle breakage that we want to catch?
-Peff