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: "C" UTF-8 trouble


On Oct  6 16:14, Andy Koppe wrote:
> 2009/10/6 Corinna Vinschen:
> > The problem is what do we do? ?POSIX requires that the default
> > locale is "C".
> 
> Agreed, we can't change that.
> 
> 
> >?Do you actually propose to change the environment at
> > process startup
> 
> Yes, except that I was thinking it would be sufficient to do this at
> the start of a Cygwin process tree only, and not for every process.
> 
> 
> > along these lines:
> >
> > ?if (!getenv ("LC_ALL") && !getenv ("LC_CTYPE", && !getenv ("LANG"))
> > ? ?setenv ("LC_CTYPE", "C.UTF-8", 0);
> 
> This would do:
> 
>   setenv ("LANG", "C.UTF-8", 0);
> 
> Zero as the third parameter ensures that an existing LANG isn't
> overwritten. And if LC_ALL or LC_CTYPE are set, they override LANG
> anyway.

Os it really necessary to change Cygwibn for this?  I'm wondering if we
should put this into /etc/profile and /etc/csh.login instead.  


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]