The old $LANG-in-a-box trick (was Re: X11R7.5 and C.UTF-8)
Andy Koppe
andy.koppe@gmail.com
Thu Dec 3 20:31:00 GMT 2009
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
More information about the Cygwin-developers
mailing list