|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-10-10 16:00 UTC] aidan@php.net
[2004-10-10 16:20 UTC] tony2001@php.net
[2004-10-11 08:01 UTC] derick@php.net
[2004-10-11 11:41 UTC] TiloLutz at gmx dot de
[2004-10-11 12:40 UTC] chregu@php.net
[2004-10-11 13:00 UTC] derick@php.net
[2004-12-06 22:08 UTC] pmichaud at pobox dot com
[2005-02-12 22:00 UTC] tony2001@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Dec 02 20:00:01 2025 UTC |
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