delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/12/02/13:22:01

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Date: Wed, 2 Dec 2009 19:21:40 +0100
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: Base-Files (was Re: Unset TMP/TEMP in profile?)
Message-ID: <20091202182140.GT8059@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <4B14573C DOT 3040409 AT alice DOT it> <a13b5a590911301753w74ccf298g669e55fc58d36c50 AT mail DOT gmail DOT com> <20091201091515 DOT GC30043 AT calimero DOT vinschen DOT de> <b610e770a6f8ab524e0df3c9ce625e84 DOT squirrel AT mail DOT morrison DOT mine DOT nu> <a13b5a590912010832t52d7ed9cjd2c093ac7d6ea9a4 AT mail DOT gmail DOT com> <89d87180772edf0cb5974b7d21ed1f50 DOT squirrel AT mail DOT morrison DOT mine DOT nu> <20091202093042 DOT GO8059 AT calimero DOT vinschen DOT de> <4B16A22A DOT 4070402 AT towo DOT net>
MIME-Version: 1.0
In-Reply-To: <4B16A22A.4070402@towo.net>
User-Agent: Mutt/1.5.20 (2009-06-14)
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

On Dec  2 18:21, Thomas Wolff wrote:
> Corinna Vinschen wrote in another thread about setting LANG:
> >>... Andy and Thomas, please work
> >>out the best solution together.  It should work in sh and csh.  Then
> >>post it as reply to http://cygwin.com/ml/cygwin/2009-12/msg00090.html so
> >>John can put it into the base-files package.
> Our worked-out proposal is as follows:
> 
> 
> /etc/profile.d/lang.sh:
> 
> # if no locale variable is set, indicate terminal charset via LANG
> test -z "${LC_ALL:-${LC_CTYPE:-$LANG}}" && export LANG=C.UTF-8
> 
> /etc/profile.d/lang.csh:
> 
> # if no locale variable is set, indicate terminal charset via LANG
> ( test $?LC_ALL = 0 || test -z "$LC_ALL" ) && ( test $?LC_CTYPE = 0 || test -z "$LC_CTYPE" ) && ( test $?LANG = 0 || test -z "$LANG" ) && setenv LANG C.UTF-8

Thanks to both of you.

> where the details of how lang.sh or lang.csh, resp., are invoked,
> are up to you.

All scripts in /etc/profile.d are called from /etc/profile (*.sh
scripts) and /etc/csh.cshrc (*.csh) respectively.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019