Bug #54517 [Opn->Bgs]: word boundary \b fails with Scandinavian alphabet
| From: | cataphract@php.net | Date: | Wed, 13 Apr 2011 08:40:35 +0000 |
| Subject: | Bug #54517 [Opn->Bgs]: word boundary \b fails with Scandinavian alphabet | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-160141@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=54517&edit=1
ID: 54517
Updated by: cataphract@php.net
Reported by: antti dot nylund at gmail dot com
Summary: word boundary \b fails with Scandinavian alphabet
-Status: Open
+Status: Bogus
Type: Bug
Package: Regexps related
Operating System: Linux
PHP Version: 5.3.6
Block user comment: N
Private report: N
New Comment:
Sorry, but your problem does not imply a bug in PHP itself. For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system
is not the
appropriate forum for asking support questions. Due to the volume
of reports we can not explain in detail here why your report is not
a bug. The support channels will be able to provide an explanation
for you.
Thank you for your interest in PHP.
Prints 0 with the u flag, as expected since at least 5.3.4 when the
PCRE_UCP started being used when u is present.
Previous Comments:
------------------------------------------------------------------------
[2011-04-12 21:19:35] antti dot nylund at gmail dot com
Description:
------------
---
From manual page: http://www.php.net/function.preg-match-all
---
Word preceding ö ä or å will not be matched/counted.
Tried setting local with setlocale(LC_ALL, "fi_FI");
Test script:
---------------
$teststring = "Talvivaate on talvikäyttöön ja kesävaate on
kesäkäyttöön.";
preg_match_all("/\bvaate\b/i",$teststring,$keywords,PREG_OFFSET_CAPTURE);
$rows = count($keywords[0],0);
echo $rows;
Expected result:
----------------
Should print 2
Actual result:
--------------
Prints out 1
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=54517&edit=1