Re: Incomprehension with preg_match and utf8
| From: | Philip Olson | Date: | Tue, 06 Nov 2012 04:54:55 +0000 |
| Subject: | Re: Incomprehension with preg_match and utf8 | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-63756@lists.php.net to get a copy of this message | ||
On Nov 5, 2012, at 8:55 AM, Rasmus Lerdorf wrote:
> On 11/05/2012 08:41 AM, Jean-Sébastien Hedde wrote:
>> On Mon, 05 Nov 2012 08:04:06 -0800, Rasmus Lerdorf <rasmus@lerdorf.com>
>> wrote:
>>>
>>> I think the documentation is wrong on that. In Unicode mode [[:alnum:]]
>>> actually becomes \p{Xan} which should match Unicode chars as well, but
>>> only if PCRE was compiled with Unicode support. So I suspect you don't
>>> actually have a Unicode-capable PCRE build in some cases there.
>>>
>>> -Rasmus
>>
>> I will report the bug to the package maintainers (remi, debian too...).
>>
>> Is there anyway for us to avoid those "wrong" builds ?
>
> I don't see how.
Hi geeks,
Does anyone have a suggestion on how the documentation should be
updated? The quote is from here:
http://php.net/manual/en/regexp.reference.character-classes.php
With the quote being:
"In UTF-8 mode, characters with values greater than 128 do
not match any of the POSIX character classes."
A few simple/related facts:
- PCRE_UCP exists as of PCRE 8.10
- Gustavo mentioned the related PHP change on Oct 3, 2010 (not sure
what PHP version, and googling for "87a237342" turns up empty,
and I miss SVN version numbers)
Anyway, how should this be documented?
Regards,
Philip