Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:63741 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 13315 invoked from network); 5 Nov 2012 10:33:06 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Nov 2012 10:33:06 -0000 Authentication-Results: pb1.pair.com smtp.mail=glopes@nebm.ist.utl.pt; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=glopes@nebm.ist.utl.pt; sender-id=unknown Received-SPF: error (pb1.pair.com: domain nebm.ist.utl.pt from 193.136.128.21 cause and error) X-PHP-List-Original-Sender: glopes@nebm.ist.utl.pt X-Host-Fingerprint: 193.136.128.21 smtp1.ist.utl.pt Linux 2.6 Received: from [193.136.128.21] ([193.136.128.21:53892] helo=smtp1.ist.utl.pt) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 6B/97-00811-ED597905 for ; Mon, 05 Nov 2012 05:33:03 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp1.ist.utl.pt (Postfix) with ESMTP id 9C7147000446; Mon, 5 Nov 2012 10:32:58 +0000 (WET) X-Virus-Scanned: by amavisd-new-2.6.4 (20090625) (Debian) at ist.utl.pt Received: from smtp1.ist.utl.pt ([127.0.0.1]) by localhost (smtp1.ist.utl.pt [127.0.0.1]) (amavisd-new, port 10025) with LMTP id HGIOFqisd95Q; Mon, 5 Nov 2012 10:32:58 +0000 (WET) Received: from nebm.ist.utl.pt (unknown [IPv6:2001:690:2100:4::58:1]) by smtp1.ist.utl.pt (Postfix) with ESMTP id 4277E7000442; Mon, 5 Nov 2012 10:32:58 +0000 (WET) Received: from localhost ([127.0.0.1] helo=nebm.ist.utl.pt) by nebm.ist.utl.pt with esmtp (Exim 4.72) (envelope-from ) id 1TVJzF-0005KY-UE; Mon, 05 Nov 2012 10:32:57 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Date: Mon, 05 Nov 2012 11:32:57 +0100 To: =?UTF-8?Q?Jean-S=C3=A9bastien_Hedde?= , internals PHP Organization: =?UTF-8?Q?N=C3=BAcleo_de_Engenharia_Biom=C3=A9dica_do_Insti?= =?UTF-8?Q?tuto_Superior_T=C3=A9cnico?= In-Reply-To: <5fce29a0cb5467c00eeb267dd38fd788@localhost> References: <5fce29a0cb5467c00eeb267dd38fd788@localhost> Message-ID: X-Sender: glopes@nebm.ist.utl.pt User-Agent: RoundCube Webmail/0.8-rc Subject: Re: [PHP-DEV] Incomprehension with =?UTF-8?Q?preg=5Fmatch=20and?= =?UTF-8?Q?=20utf=38?= From: glopes@nebm.ist.utl.pt (Gustavo Lopes) Em 2012-11-05 10:57, Jean-Sébastien Hedde escreveu: > I'm facing an issue with preg_match and an UTF8 string. > > The pattern is : /^[[:alnum:]\s\-\'%]+$/u > The string : Régis > > If I read the manual preg_match should return 0 ("In UTF-8 mode, > characters with values greater than 128 do not match any of the POSIX > character classes.") but I've got 1 in some case : > The documentation is simply out-of-date. We have set PCRE_UCP if the 'u' modifier is present for some time now (since 87a237342, 3 Oct 2010). Look for PCRE_UCP in http://www.pcre.org/pcre.txt to know the implications. -- Gustavo Lopes