This is the mail archive of the
cygwin-developers
mailing list for the Cygwin project.
Re: bash and the current locale implementation
- From: Andy Koppe <andy dot koppe at gmail dot com>
- To: cygwin-developers at cygwin dot com
- Date: Thu, 1 Oct 2009 12:09:37 +0100
- Subject: Re: bash and the current locale implementation
- References: <20091001102822.GE7193@calimero.vinschen.de>
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?
Andy