X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_41,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org To: cygwin AT cygwin DOT com From: Lapo Luchini Subject: Re: The C locale Date: Tue, 22 Sep 2009 19:04:10 +0200 Lines: 37 Message-ID: References: <416096c60908300959i1e0084b1xc8f6e65e792b035d AT mail DOT gmail DOT com> <20090908193456 DOT GC17515 AT calimero DOT vinschen DOT de> <416096c60909081449r1fe024dbm7b82a3719be05e9e AT mail DOT gmail DOT com> <20090921103758 DOT GE20981 AT calimero DOT vinschen DOT de> <416096c60909211420g4ac8ea93l80fc1f00dcd5c0f3 AT mail DOT gmail DOT com> <416096c60909212347r7e03a4f3q7d518ff7e8bce55d AT mail DOT gmail DOT com> <416096c60909220549jaa601d9l26621e9910136a3 AT mail DOT gmail DOT com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit User-Agent: Thunderbird 2.0.0.23 (X11/20090831) In-Reply-To: OpenPGP: id=C8F252FB X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Mark J. Reed wrote: > Yes, but it's working because you (1) lied about your locale (using C > when your terminal is set to UTF-8) and (2) happen to have your > terminal set to UTF-8, which is how Cygwin happens to be encoding the > character. It's a big accident and stops working if you were > actually using a non-UTF-8 terminal and locale (hopefully matching > ones). I'm very sorry, but I still can't see your point... =( It's true, "by accident" my terminal is using the more general ASCII-compatible charset possible (that is, UTF-8) and Cygwin is currently using that as a default as well, ok. So LANG=C works essentially because my terminal uses THE SAME charset as Cygwin uses by default (and not specifically because that's UTF-8). But OTOH if LANG=C used CP1252 it would only work only if my terminal "by accident" was using the very same CP1252 and would stop working if I were using a non-CP1252 terminal and matching locale. How is this a fundamentally different case? In the first case I have to match my terminal, but I can see *any* character really and never get any "surprise". In the second case I can use default cmd.exe, but I get a crippled output in many possible usecases. The main reason I see for using CP1252 (or anything that's the default CP, CP1252 is just an example) is that cygwin-in-cmd.exe would show the *same* crippledness shown by the default native WindowsPrompt, so even if very limited, the user would get the least surprise. And as far a traffic on cygwin AT cygwin DOT com goes, I see that's a VERY valid issue. -- Lapo Luchini - http://lapo.it/ “Premature optimisation is the root of all evil in programming.” (C. A. R. Hoare) -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple