This is the mail archive of the
mailing list for the Cygwin project.
Re: bash and the current locale implementation
On Oct 1 12:09, Andy Koppe wrote:
> 2009/10/1 Corinna Vinschen:
> > We have a problem with bash.
> > I'm using tcsh as my default shell, so I didn't see this problem
> > earlier. ?When you enter `setenv LANG=foo' in tcsh, it changes its its
> > own environment and calls setlocale (LC_ALL, ""). ?Everything's fine.
> > Bash, OTOH, does not do anything of this. ?Assuming you enter `export
> > LANG=foo', bash will not at all change its own environment.
> That's standard behaviour. The locale variables need to be set up
> before bash is invoked, e.g. in cygwin.bat or in the Windows
> environment (or in the mintty settings).
> Someone who does need to change locale on the fly the can always
> invoke a new shell: 'LANG=foo bash -l'. In the console, that would
> actually change the console charset accordingly. In a terminal, they'd
> have to adjust the terminal themselves.
> > Does anybody have a nifty, easy to implement idea how to workaround this
> > problem in bash?
> Colour me dubious. If bash did change its locale setting, that still
> wouldn't change the charset of the console or terminal it's running
> in. And what about its line history? Would it need to recode it all?
That's not what we had talked about. The charset of the console is
determined by the environment setting of the current application.
See the modified list in
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Project Co-Leader cygwin AT cygwin DOT com