Re: Re[2]: [PHP-DEV] PHP 4.3 charter and release plan
| From: | Stig S. Bakken | Date: | Tue, 07 May 2002 09:35:58 +0000 |
| Subject: | Re: Re[2]: [PHP-DEV] PHP 4.3 charter and release plan | ||
| References: | 1 2 3 4 5 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-83782@lists.php.net to get a copy of this message | ||
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 Á£Ó1ƒõÿày!!üž
> > ÀŒ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?
- Stig