This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: How LANG environment variable is set?
- From: David Rothenberger <daveroth at acm dot org>
- To: cygwin at cygwin dot com
- Date: Thu, 24 Apr 2014 14:56:21 -0700
- Subject: Re: How LANG environment variable is set?
- Authentication-results: sourceware.org; auth=none
- References: <53597E6B dot 1080207 at alice dot it>
- Reply-to: cygwin at cygwin dot com
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