Re: Fwd: [PEAR-DEV] #30382 [NEW]: preg_match and utf-8

From: Date: Mon, 11 Oct 2004 06:13:08 +0000
Subject: Re: Fwd: [PEAR-DEV] #30382 [NEW]: preg_match and utf-8
References: 1  Groups: php.pecl.dev 
Request: Send a blank email to pecl-dev+get-1433@lists.php.net to get a copy of this message
On Sun, 10 Oct 2004, Daniel Convissor wrote: > Hi: > > PECL bugs from bugs.php.net are still going to pear-dev. Thought > y'all would want to see this report... Kill the bug, it's not PECL related and he already filed it in the normal bugsystem. Derick > ----- Forwarded message from TiloLutz at gmx dot de <pear-dev@lists.php.net> ----- > > From: "TiloLutz at gmx dot de" <pear-dev@lists.php.net> > To: pear-dev@lists.php.net > Date: Sun, 10 Oct 2004 15:49:48 +0200 > Subject: [PEAR-DEV] #30382 [NEW]: preg_match and utf-8 > > From: TiloLutz at gmx dot de > Operating system: Suse Linux 9.1 > PHP version: 4.3.9 > PHP Bug Type: PECL related > Bug description: preg_match and utf-8 > > 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 > > > > -- Derick Rethans http://derickrethans.nl | http://ez.no | http://xdebug.org

« previous php.pecl.dev (#1433) next »