Re: Re[2]: [PHP-DEV] PHP 4.3 charter and release plan
| From: | Jan Schneider | Date: | Tue, 07 May 2002 11:26:28 +0000 |
| Subject: | Re: Re[2]: [PHP-DEV] PHP 4.3 charter and release plan | ||
| References: | 1 2 3 4 5 6 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-83798@lists.php.net to get a copy of this message | ||
Zitat von "Stig S. Bakken" <ssb@fast.no>:
> On Mon, 2002-05-06 at 11:54, Jan Schneider wrote:
> > Zitat von Andrew Sitnikov <sitnikov@infonet.ee>:
> >
> > > Hello Stig,
> > >
> > > SSB> Huh, are you saying PHP _is_ locale-dependant?
> > > Yes.
> > >
> > > Example:
> > > 1.php
> > > <?
> > > setlocale(LC_ALL,'ru_RU.CP1251');
> > > include('2.php');
> > > ?>
> > >
> > > 2.php
> > > <?
> > > $var = 1.3;
> > > var_dump($var);
> > > ?>
> > >
> > > gap /home/local/sitnikov> GET
> > > http://si.infonet.ee/1.php
> > > float(1)
> > >
> > > Locale ru_RU.CP1251 has decimal delimiter ',';
> > >
> > > I understand why it occurs (thanks to Stanislav Malyshev), but this
> is
> > > not correct behaviour IMHO, and must be fixed ASAP.
> >
> > Perhaps Bug 16865 (http://bugs.php.net/bug.php?id=16865) falls into the
>
> > same category of locale dependent bugs:
> >
> > To quote from the bug entry:
> >
> > ---snip---
> > It seems like some constants are getting
> > undefined if you set the locale to tr_TR. It happens randomly with
> > internally defined and user defined constants and is reproducable with
> > this little script:
> >
> > <?php
> >
> > setlocale(LC_ALL, 'tr_TR');
> >
> > echo extension_loaded('imap');
> > echo SORTARRIVAL;
> >
> > ?>
> > ---snip---
> >
> > This happened so far only with this specific locale, 'tr' for example
> works.
> >
> > Jan.
>
> Does this have to do with what Andrew Sitnikov mentioned about locale
> settings being used in the parser?
I have no idea why this happens. But perhaps someone who knows what he's
doing can run this sample script through strace and find out.
Jan.
--
http://www.horde.org - The Horde Project
http://www.ammma.de - discover your knowledge
http://www.tip4all.de - Deine private Tippgemeinschaft