This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: How LANG environment variable is set?


Angelo Graziosi wrote:
> I remember that some time ago I had, in mintty,
> 
> $ echo $LANG
> it_IT.UTF-8
> 
> Now LANG is empty ('echo $LANG' prints nothing).
> 
> I notice that /etc/profile.d has lang.sh which should set LANG when I
> start mintty. That script contains
> 
> test -z "${LC_ALL:-${LC_CTYPE:-$LANG}}" && export LANG=$(/usr/bin/locale -uU)
> 
> and at command line, '/usr/bin/locale -uU' prints it_IT.UTF-8...

It looks like /etc/profile sets LC_ALL=C before running the scripts
in /etc/profile.d, then restores it to its original setting. This
prevents LANG getting set by lang.sh.

-- 
David Rothenberger  ----  daveroth@acm.org

"It's what you learn after you know it all that counts."
                -- John Wooden

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]