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

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


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

[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).

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

[2004-10-10 16:20:16] [EMAIL PROTECTED]

"PCRE related" is the right category for this report.


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

[2004-10-10 16:00:19] [EMAIL PROTECTED]

Reassigning to proper category.

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

[2004-10-10 15:49:47] TiloLutz at gmx dot de

Description:
------------
preg_match doesn't work correct when utf-8 is used

preg_match('/^([[:alpha:]])*$/u', "ä")
should return true because [[:alpha:]] contains
also localized special characters like äöü.
Unfortunatly it returns false.

It works with iso-8859-15 but doesn't work with utf-8


Reproduce code:
---------------
putenv("LANG=de_DE");
setlocale(LC_ALL, "de_DE");
if (preg_match('/^([[:alpha:]])*$/u', "ä") echo "true";

putenv("LANG=de_DE.utf8");
setlocale(LC_ALL, "de_DE.utf8");
if (preg_match('/^([[:alpha:]])*$/u', "ä") echo "true";


Expected result:
----------------
true
true




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


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

Reply via email to