Re: PCRE regex result is different between Linux & Windows.
| From: | ClapClap | Date: | Wed, 12 Nov 2008 10:23:57 +0000 |
| Subject: | Re: PCRE regex result is different between Linux & Windows. | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-283211@lists.php.net to get a copy of this message | ||
ClapClap <2000ans <at> free.fr> writes:
>
> ClapClap <2000ans <at> free.fr> writes:
>
> > My versions of PCRE :
> > - Linux 7.4 2007-09-21 (PHP 5.2.4-2ubuntu5.3)
> > - Windows XP 7.2 2007-06-19 (PHP 5.2.4)
> >
>
> And :
> - Windows 2000 7.6 2008-01-28 (PHP 5.2.6)
>
> It works fine under Windows with PCRE 7.2 & 7.6.
> I do not know why....
>
Again and again...
I've found the mistake.
It's the string encoding conversion to UTF-8 which make regex differences.
On Linux, it uses Glibc 2.7 while on Windows, it's libiconv 1.11.
According to PHP manual http://docs.php.net/manual/en/intro.iconv.php
:
We have to use libiconv to play with encoding, it's better than Glibc.
Damned !