Re: [pcre-dev] issue with pcre 7.8 in PHP lib

Kezdőlap
Üzenet törlése
Szerző: steve lu
Dátum:  
Címzett: pcre-dev
Tárgy: Re: [pcre-dev] issue with pcre 7.8 in PHP lib
Hi,

Soon after I posted this email, I found the cause.

PHP 5.2.9's Makefile script has this compiler define, -DEBCDIC=0.
But in PCRE source, it uses '#ifdef EBCDIC #else #endif' to
conditionally include
a character table.

This inconsistency led to EBCDIC always defined and thereby a wrong
character table used in the final build.

Steve

Philip Hazel wrote:
> On Sun, 9 Aug 2009, steve lu wrote:
>
>
>> When I execute this code below on MacOSX, php returns 1.
>>
>> print( preg_match('/[\d]/', '1') );
>>
>> but on Windows, it always return 0.
>>
>
> I strongly suspect this has nothing to do with PCRE, but everything to
> do with the way it is called from PHP. I'm afraid I can't help, as I
> don't know anything about PHP. (Or about MacOSX or Windows.) Have you
> tested other backslashed constructs? If this were a C program, you would
> need to use \\ in order to pass a single backslash to PCRE. Is it
> something like that?
>
> Philip
>
>