This is the mail archive of the
cygwin-developers
mailing list for the Cygwin project.
Re: The old $LANG-in-a-box trick (was Re: X11R7.5 and C.UTF-8)
- From: Andy Koppe <andy dot koppe at gmail dot com>
- To: cygwin-developers at cygwin dot com
- Date: Thu, 3 Dec 2009 20:31:47 +0000
- Subject: Re: The old $LANG-in-a-box trick (was Re: X11R7.5 and C.UTF-8)
- References: <4AE8539E.9080004@cornell.edu> <4AE8BC12.1060109@cornell.edu> <416096c60910281507n4774534dode1d24ac47d5b0a2@mail.gmail.com> <4B1115EC.7010308@cornell.edu> <4B174C20.1040900@tlinx.org> <416096c60912022348i36504e14l726efc9fc9c360e6@mail.gmail.com> <20091203045401.L85368@mail101.his.com> <416096c60912030516r42f67c05yfaa3b64fcca68b43@mail.gmail.com> <20091203134837.GX8059@calimero.vinschen.de> <20091203184458.GZ8059@calimero.vinschen.de>
2009/12/3 Corinna Vinschen:
> I created a new, simplified version of my tiny getlocale tool, which
> prints "export LANG=..." to stdout, or "setenv LANG ..." if the -c
> option has been given. ÂSee attached source.
Another suggestion: I think the tool could be more flexibly used if it
printed the "language_TERRITORY" bit only. The charset and the
variable syntax can be added in scripts using the tool, e.g.:
test -z "${LC_ALL:-${LC_CTYPE:-$LANG}}" && export LANG=$(getlocale).UTF-8
This would remove the need for the --csh and --UTF-8 options.
Andy