X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:to:from:subject:date:message-id:references :mime-version:content-type:content-transfer-encoding :in-reply-to; q=dns; s=default; b=uKW7wtCBAdU07s2WIwDTScw/9+2sBk lw3G5j9hruCOrFym9iqZlx4NP0XS8E2RZW4n/8LrUkMLef39/Jr2K9SQ5eGQ9WSD WyODBe/ClQc5BxV6s1tZKLkbTYWAkQpXWJcIECTan6I+hGWArJ1mLViJ/Et9y5Hw WxLUzgZYat3CQ= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:to:from:subject:date:message-id:references :mime-version:content-type:content-transfer-encoding :in-reply-to; s=default; bh=LdDcc1zLM4RX+tF//hyxMQVzvPI=; b=V6ak IA/0aENc4/WTf83GCTjuXjpke1BwcAUwwfycGBD1BbzgsmT1JGkGTFgK/OzncD7K G5m6c3JclWiHGJC376JpfC2KVN/iN2W0N33zilw4rk28ssz0zYMCE6NmaILGCErt ByuFVbQ1lMqdLovxgiCH3paVFgohVkc5ydq6SbU= 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 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.7 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,RCVD_NUMERIC_HELO,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS,T_FSL_HELO_BARE_IP_2 autolearn=ham version=3.3.2 X-HELO: plane.gmane.org To: cygwin AT cygwin DOT com From: Andrew DeFaria Subject: Re: locale -uU in ~/.profile Date: Tue, 30 Sep 2014 14:25:21 -0700 Lines: 40 Message-ID: References: <542B0E9B DOT 2080909 AT redhat DOT com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.1.2 In-Reply-To: <542B0E9B.2080909@redhat.com> X-IsSubscribed: yes On 9/30/2014 1:12 PM, Eric Blake wrote: > On 09/30/2014 11:53 AM, Andrew DeFaria wrote: >> I recently debugged this. I share my home directory from a NetApp filer >> such that I can use it from Cygwin or the various Linux machines at my >> client (largely CentOS). Recently I started seeing: >> >> Adefaria-lt:ssh cm-db-ltest01 >> locale: invalid option -- 'u' >> Try `locale --help' or `locale --usage' for more information. >> Cm-db-test01: >> >> Hunting this down I found that I have a ~/.profile now (didn't have one >> before) and contained therein is the following: >> >> # Set user-defined locale >> export LANG=$(locale -uU) > > Sounds like cygwin's base-files should be updated to guard > cygwin-specific .profile contents to only occur when uname says it is > running on cygwin. I'm sure the maintainer would love patches... > >> >> Turns out that on CentOS locale doesn't support -uU. Now this .profile >> came from a refreshing of Cygwin. How best to handle this... > > You can guard that with something as simple as: > > case $(uname) in > CYGWIN*) export LANG=$(locale -uU) ;; > esac > > (hmm, the moment you also share the .profile with a Solaris box, you'd > have to use `` instead of $(), but that's another story) > Is Solaris still that backward?!? I haven't been on a Solaris box for quite some time. Life's been good... -- Andrew DeFaria http://defaria.com -- 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