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


On Oct  1 04:50, Eric Blake wrote:
> According to Corinna Vinschen on 10/1/2009 4:28 AM:
> > Consequentially, bash can't just call setlocale (LC_ALL, "").  Instead,
> > bash calls the following:
> > 
> >   setlocale (LC_CTYPE, "foo");
> >   setlocale (LC_NUMERIC, "foo");
> >   setlocale (LC_TIME, "foo");
> >   [...]
> 
> I'll see if I can find some way to patch bash.

  setenv (locale_var);
  if (locale_var == "LANG" || "LC_ALL")
    setlocale (LC_ALL, "");
  else if (locale_var == "LC_CTYPE")
    setlocale (LC_CTYPE, "");

would be sufficient.  But I can't say I'm really happy about this.  It
sure sounds like a hack, having to change bash.  Unfortunately I can't
see any way to change Cygwin as long as the application doesn't change
its own environment.

> > Same goes for dash, btw, but it isn't locale-aware anyway.
> 
> dash prides itself on being as small as possible; I'm not going out of my
> way to change that by adding locale support.

Sure enough.


Thanks,
Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat


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