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
> Ok, I have a small patch which changes the current implementation
> so that a switch to another Cygwin-internal charset only works at
> process startup. ÂNo setenv/setlocale combination from the application
> itself will change the internally used charset.
>
> Basically that's what you see in bash already without the change.
> export LANG=de will only have an effect on child processes.
>
> Is that now the feasible behaviour, finally?

Fingers crossed ...


> Â /* Set internal locale to the environment settings. */
> - Âsetlocale (LC_CTYPE, "");
> + Âinitial_setlocale ();
> Â /* Reset application locale to "C" per POSIX */
> Â _setlocale_r (_REENT, LC_CTYPE, "C");

Does initial_setlocale() still need to save and possibly restore the
old locale given that it's immediately followed by the _setlocale_r
call?

Andy


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