Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:136 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 60236 invoked from network); 21 Mar 2003 18:11:19 -0000 Received: from unknown (HELO secure.thebrainroom.com) (213.239.42.171) by pb1.pair.com with SMTP; 21 Mar 2003 18:11:19 -0000 Received: from zaneeb.brainnet.i (brain.dial.nildram.co.uk [195.149.29.154]) by secure.thebrainroom.com (8.9.3/8.9.3) with ESMTP id SAA04097; Fri, 21 Mar 2003 18:29:54 GMT Received: from zaneeb.brainnet.i (zaneeb.brainnet.i [127.0.0.1]) by zaneeb.brainnet.i (8.11.6/8.11.6) with ESMTP id h2LIBHB03837; Fri, 21 Mar 2003 18:11:18 GMT Date: Fri, 21 Mar 2003 18:11:17 +0000 (GMT) X-X-Sender: wez@zaneeb.brainnet.i To: Nathan Fredrickson cc: "php.internals" In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: Re: [PHP-DEV] issues with gettext on multithreaded servers From: wez@thebrainroom.com (Wez Furlong) Hi Nathan, In short, don't rely on the system locale support then :/ (You can't rely on it even between different versions of glibc, let alone difference flavours of UNIX). A win32nls extension is a good idea and a nice candidate for PECL. Perhaps it would be a good idea to develop a PEAR package that sits on top of the win32nls and/or UNIX nls functions to provide a portable API for PHP scripts? --Wez. On Fri, 21 Mar 2003, Nathan Fredrickson wrote: > Hi all, > > I have found some problems (and possible solutions) concerning use of the > gettext extension on multithreaded servers. ... > The alternative then is to call SetThreadLocale() through a new php > extension. I think this should be seperate from the gettext extension since > locales are used more widely than just gettext. My current idea is to > create an extension named w32nls. This would be a win32 only extension that > would provide access to a collection of the functions in the win32 NLS API > [1] including Get/SetThreadLocale(). ... > The downside however will be increased incompatibility between win32 and > unix based PHP applications if such an extension is ever widely used. > > I welcome any feedback on these ideas before I proceed. > Thanks, Nathan