ID:               30382
 Updated by:       [EMAIL PROTECTED]
 Reported By:      TiloLutz at gmx dot de
-Status:           Assigned
+Status:           Bogus
 Bug Type:         PCRE related
 Operating System: Suse Linux 9.1
 PHP Version:      4.3.9
 Assigned To:      derick
 New Comment:

PCRE has limited UTF-8 support.
"A  class  is  matched  against a UTF-8 character instead of just a
single byte, but it can match only characters whose values are less
than 256. Characters with greater values always fail to match a class."
(c) man pcre

No bug in PHP -> bogus.


Previous Comments:
------------------------------------------------------------------------

[2004-12-06 22:08:02] pmichaud at pobox dot com

It might help to know that PCRE doesn't support the [:alpha:],
[:digit:], etc. classes in UTF-8 mode.  From
http://www.pcre.org/pcre.txt, under "POSIX CHARACTER CLASSES":

   In UTF-8 mode, characters with values greater than 128 do not match
any of the POSIX character classes.

So, the fact that [:alpha:] doesn't work on UTF-8 strings appears to be
a limitation of PCRE itself.  (And I do so strongly wish it were
otherwise.)

Pm

------------------------------------------------------------------------

[2004-10-11 13:00:20] [EMAIL PROTECTED]

I can reproduce it too, but I need to think real hard about it first
before I can say whether it is correct or not :)

------------------------------------------------------------------------

[2004-10-11 12:40:36] [EMAIL PROTECTED]

I can reproduce it on Debian, but not on Mac OS X

------------------------------------------------------------------------

[2004-10-11 11:41:34] TiloLutz at gmx dot de

You can find an example at 
http://www.stud.uni-karlsruhe.de/~usjp/preg_match.zip 
 
The file is 100% encoded as utf8.

------------------------------------------------------------------------

[2004-10-11 08:01:17] [EMAIL PROTECTED]

This depends on how the รค is encoded in your script. If it's just
iso-8859-1 then it won't work. No bug here unless you can come up with
an example that works. (Post a link to a zip file containing your
scripts).

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/30382

-- 
Edit this bug report at http://bugs.php.net/?id=30382&edit=1

Reply via email to