X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Message-ID: <42031.83.86.0.251.1294854455.squirrel@lavabit.com> Date: Wed, 12 Jan 2011 18:47:35 +0100 (CET) Subject: Re: suggestion (was Re: 1.7.7: Localization does not follow the language of the OS) From: cornwarecjp AT lavabit DOT com To: cygwin AT cygwin DOT com User-Agent: SquirrelMail/1.4.13 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: 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 > The official way to set the locale is to use the locale(1) tool, see the > User's Guide http://cygwin.com/cygwin-ug-net/using-utils.html#locale > > export LANG=`locale -u` setenv LANG `locale -u` > export LANG=`locale -s` setenv LANG `locale -s` > > or better > > export LANG=`locale -uU` setenv LANG `locale -uU` > export LANG=`locale -sU setenv LANG `locale -sU` Thanks for this suggestion. I tested the locale command, and it does what you describe. Unfortunately, the people who download my application usually don't have Cygwin, so I'll have to distribute locale.exe with my application. Also, this trick will add extra complexity to my software, which is (AFAIK) not necessary on other UNIX platforms. Despite these disadvantages, I think this is a useful solution for me. locale.exe is only 18kB; I'll just check the license again to see if this distributing is OK. About the quotation method discussion: I think this is irrelevant for me, as I am planning to call locale directly from the C++ code, to retrieve the system locale, and then, again from C++, set the LANG variable, before initializing the localization. > This has been discussed a couple of months ago and the decision was to > set the lang to C.UTF-8 by default on all systems and everything else is > up to the user. I'm too lazy to search but you'll find lengthy > discussions in the archives. I'd like to see this discussion. I have been looking for something like this in the mailing list, but I couldn't find it. Do you have suggestions for search keywords? I understand if you don't want to reopen old discussions, but I am curious what sort of advantages are achieved by always setting LANG to C.UTF-8. -- 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