Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:63740 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 9910 invoked from network); 5 Nov 2012 09:57:39 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Nov 2012 09:57:39 -0000 Authentication-Results: pb1.pair.com smtp.mail=jeanseb@au-fil-du.net; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=jeanseb@au-fil-du.net; sender-id=pass Received-SPF: pass (pb1.pair.com: domain au-fil-du.net designates 178.32.124.17 as permitted sender) X-PHP-List-Original-Sender: jeanseb@au-fil-du.net X-Host-Fingerprint: 178.32.124.17 20.mo6.mail-out.ovh.net Received: from [178.32.124.17] ([178.32.124.17:47838] helo=mo6.mail-out.ovh.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id CF/27-00811-19D87905 for ; Mon, 05 Nov 2012 04:57:38 -0500 Received: from mail355.ha.ovh.net (b7.ovh.net [213.186.33.57]) by mo6.mail-out.ovh.net (Postfix) with SMTP id 070F6FF84D8 for ; Mon, 5 Nov 2012 11:05:31 +0100 (CET) Received: from b0.ovh.net (HELO queueout) (213.186.33.50) by b0.ovh.net with SMTP; 5 Nov 2012 09:57:34 -0000 Received: from ns0.ovh.net (HELO ssl0.ovh.net) (213.186.33.20) by ns0.ovh.net with SMTP; 5 Nov 2012 09:57:34 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Date: Mon, 05 Nov 2012 10:57:33 +0100 To: internals X-Ovh-Mailout: 178.32.228.6 (mo6.mail-out.ovh.net) Message-ID: <5fce29a0cb5467c00eeb267dd38fd788@localhost> X-Sender: jeanseb@au-fil-du.net User-Agent: RoundCube Webmail/0.4 X-Ovh-Tracer-Id: 10200090206861234635 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrfeehfedrfedvucetufdoteggodetrfcurfhrohhfihhlvgemucfqggfjnecuuegrihhlohhuthemuceftddtnecunecuhfhrohhmpeflvggrnhdquforsggrshhtihgvnhgpjfgvugguvgcuoehjvggrnhhsvggssegruhdqfhhilhdqughurdhnvghtqeenucffohhmrghinheprghuqdhfihhlqdguuhdrnhgvthenucfjughrpeggtgfgfffhvffukfigfgesthekjhdttderje Subject: Incomprehension with =?UTF-8?Q?preg=5Fmatch=20and=20utf=38?= From: jeanseb@au-fil-du.net (=?UTF-8?Q?Jean-S=C3=A9bastien_Hedde?=) Hi, 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 : On a Windows host php 5.2.12 - (PCRE 7.9 2009-04-11) : preg_match === 1 On the same centos host : php 5.2.10 (Rémi's RPM) - (PCRE 6.6 06-Feb-2006) : preg_match === 0 php 5.4.8 (my build) - (PCRE 8.12 2011-01-15) : preg_match === 1 On an other Centos host : php 5.4.0 (Rémi's RPM) - (PCRE 7.8 2008-09-05) How this can be possible ? Regards, -- Jean-Sébastien Hedde au-fil-du.net