X-Recipient: archive-cygwin@delorie.com X-SWARE-Spam-Status: No, hits=-3.4 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_PASS,UNPARSEABLE_RELAY X-Spam-Check-By: sourceware.org To: cygwin@cygwin.com From: Eric Blake Subject: Re: Q: Is anybody here using the CYGWIN=codepage:oem setting? Date: Thu, 19 Mar 2009 19:41:20 +0000 (UTC) Lines: 29 Message-ID: References: <20090319130909.GZ9322@calimero.vinschen.de> <49C281F7.6080602@acm.org> <20090319181323.GB1868@calimero.vinschen.de> <49C29366.8080708@acm.org> <20090319192031.GB9322@calimero.vinschen.de> <20090319192229.GC9322@calimero.vinschen.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit User-Agent: Loom/3.14 (http://gmane.org/) X-IsSubscribed: yes Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Delivered-To: mailing list cygwin@cygwin.com Corinna Vinschen cygwin.com> writes: > > > I have no idea whether du calls setlocale() or not. It, and all the other coreutils, do call setlocale. Pretty much any application that ships with *.mo files does so (that is, any application that used gettext). > > ...unless Cygwin itself would call setlocale(). I'm not a fan of that. POSIX is explicit that an application that intentionally avoids calling setlocale() shall behave as though it had called setlocale(LC_ALL,"C"). If cygwin called setlocale(LC_ALL,"") on applications' behalf, then this will break POSIX-compliance of existing programs. Not all programs are internationalized yet. For example, I know that m4 does NOT call setlocale. On the other hand, I also have no idea how (or even if) m4 would break if cygwin called setlocale on its behalf; about the only functions it calls at the moment where running in a locale besides C would have an impact would be in things like calls to strtod() (not likely to affect many users). And one of my goals, as upstream m4 maintainer, is to eventually get m4 to the same state as coreutils where gettext is used to provide translated messages. I guess I'm declaring that I have no idea what the best approach would be, but I would like for locales to work without having to worry about changing $CYGWIN. -- Eric Blake -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/