Mailing-List: contact cygwin-developers-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-developers-owner AT cygwin DOT com Delivered-To: mailing list cygwin-developers AT cygwin DOT com Date: Thu, 29 Aug 2002 10:55:01 -0400 From: Christopher Faylor To: cygwin-developers AT cygwin DOT com, newlib AT sources DOT redhat DOT com Subject: Re: perl giving setlocale failures with recent cygwin's, Egor please comment? Message-ID: <20020829145501.GF26609@redhat.com> Reply-To: cygwin-developers AT cygwin DOT com Mail-Followup-To: cygwin-developers AT cygwin DOT com, newlib AT sources DOT redhat DOT com References: <20020829030930 DOT GA2779 AT redhat DOT com> <6880518559 DOT 20020829125652 AT logos-m DOT ru> <20020829143425 DOT GB26609 AT redhat DOT com> <20020829164441 DOT A9265 AT cygbert DOT vinschen DOT de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020829164441.A9265@cygbert.vinschen.de> User-Agent: Mutt/1.3.23.1i On Thu, Aug 29, 2002 at 04:44:41PM +0200, Corinna Vinschen wrote: >On Thu, Aug 29, 2002 at 10:34:25AM -0400, Chris Faylor wrote: >> On Thu, Aug 29, 2002 at 10:58:47PM +0900, Kazuhiro Fujieda wrote: >> >>>> On Thu, 29 Aug 2002 12:56:52 +0400 >> >>>> egor duda said: >> > >> >> Yes, it's definitely so. Previously, setlocale (LC_CTYPE, "") was >> >> returning "C", while now, in MB_CAPABLE configuration, it returns NULL. >> >> >> >> I'm not sure whether it's better to fix it in newlib or in perl, though. >> > >> >setlocale(category, "") commonly returns "C" when any relevant >> >environment variables aren't set. The MB_CAPABLE version of >> >setlocale should be fixed. >> >> Is it not doing that? AFAICT, that's how it works. > >AFAICS, it doesn't init itself by getting the env. vars settings. >In the special case of setlocale(LC_ALL, "") it initializes itself >to the "C" locale instead. But all other setlocale(LC_xxx, "") >return NULL. It's not that simple. In the case of LC_CTYPE and LC_MESSAGES, in the perl usage, it will return NULL. It returns "C" for everything else. This function differs a lot from the BSD function of the same name. I wonder if just importing a newer version from BSD would solve the problem. cgf