This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: How LANG environment variable is set?
- From: Andrey Repin <anrdaemon at yandex dot ru>
- To: "Larry Hall (Cygwin)" <cygwin at cygwin dot com>
- Date: Sat, 26 Apr 2014 03:13:28 +0400
- Subject: Re: How LANG environment variable is set?
- Authentication-results: sourceware.org; auth=none
- References: <53597E6B dot 1080207 at alice dot it> <53598885 dot 5060708 at acm dot org> <53599112 dot 9080405 at cygwin dot com>
- Reply-to: cygwin at cygwin dot com
Greetings, Larry Hall (Cygwin)!
>> 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.
Actually, it might help to set LANG in user's profile instead.
I have this bit of code, working quite well:
case "$TERM" in
xterm*)
LANG=ru_RU.UTF-8
;;
*)
LANG=ru_RU.CP866
;;
esac
(mintty sets "xterm", so does xterm itself and other shells I connect to this
system with.)
--
WBR,
Andrey Repin (anrdaemon@yandex.ru) 26.04.2014, <03:11>
Sorry for my terrible english...
--
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