From:
Operating system:
PHP version: 5.2.17
Package: Regexps related
Bug Type: Bug
Bug description:mb_ereg_search_getpos() counts umlauts twice
Description:
------------
mb_ereg_search_getpos() seems to count German umlauts twice. See test
script.
Test script:
---------------
mb_regex_encoding('UTF-8');
$test1 = "ab";
$test2 = "ääb";
$test3 = "äääb";
mb_ereg_search_init($test1, "b");
mb_ereg_search();
echo "Test1: " . mb_ereg_search_getpos(); // Result: 2
mb_ereg_search_init($test2, "b");
mb_ereg_search();
echo "Test2: " . mb_ereg_search_getpos(); // Result: 5 (should be "3")
mb_ereg_search_init($test3, "b");
mb_ereg_search();
echo "Test3: " . mb_ereg_search_getpos(); // Result: 7 (should be "4")
--
Edit bug report at http://bugs.php.net/bug.php?id=54240&edit=1
--
Try a snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=54240&r=trysnapshot52
Try a snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=54240&r=trysnapshot53
Try a snapshot (trunk):
http://bugs.php.net/fix.php?id=54240&r=trysnapshottrunk
Fixed in SVN:
http://bugs.php.net/fix.php?id=54240&r=fixed
Fixed in SVN and need be documented:
http://bugs.php.net/fix.php?id=54240&r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=54240&r=alreadyfixed
Need backtrace:
http://bugs.php.net/fix.php?id=54240&r=needtrace
Need Reproduce Script:
http://bugs.php.net/fix.php?id=54240&r=needscript
Try newer version:
http://bugs.php.net/fix.php?id=54240&r=oldversion
Not developer issue:
http://bugs.php.net/fix.php?id=54240&r=support
Expected behavior:
http://bugs.php.net/fix.php?id=54240&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=54240&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=54240&r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=54240&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=54240&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=54240&r=dst
IIS Stability:
http://bugs.php.net/fix.php?id=54240&r=isapi
Install GNU Sed:
http://bugs.php.net/fix.php?id=54240&r=gnused
Floating point limitations:
http://bugs.php.net/fix.php?id=54240&r=float
No Zend Extensions:
http://bugs.php.net/fix.php?id=54240&r=nozend
MySQL Configuration Error:
http://bugs.php.net/fix.php?id=54240&r=mysqlcfg