ID: 30382
Updated by: [EMAIL PROTECTED]
Reported By: TiloLutz at gmx dot de
-Status: Open
+Status: Bogus
Bug Type: PCRE related
Operating System: Suse Linux 9.1
PHP Version: 4.3.9
New Comment:
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).
Previous Comments:
------------------------------------------------------------------------
[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