This is the mail archive of the cygwin-developers mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: The old $LANG-in-a-box trick (was Re: X11R7.5 and C.UTF-8)


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]