How LANG environment variable is set?
Larry Hall (Cygwin)
reply-to-list-only-lh@cygwin.com
Thu Apr 24 22:33:00 GMT 2014
On 04/24/2014 05:56 PM, David Rothenberger wrote:
> 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.
>
Good catch. Yes, the latest version of base_files makes this change to
the profile_d() function. Looks like the easiest interim solution is to
downgrade to base_files-4.1-2.
--
Larry
_____________________________________________________________________
A: Yes.
> Q: Are you sure?
>> A: Because it reverses the logical flow of conversation.
>>> Q: Why is top posting annoying in email?
--
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
More information about the Cygwin
mailing list