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: bash and the current locale implementation

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?


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