ID: 42290 Updated by: [EMAIL PROTECTED] Reported By: arysin at gmail dot com -Status: Assigned +Status: Analyzed Bug Type: mbstring related Operating System: * PHP Version: 5.2CVS-2007-08-14 Assigned To: hirokawa New Comment:
I got the same result as arysin, (PHP_5_2CVS 20070819, PCRE 7.2 2007-06-19) iltas, Xiltas iltas, Xiltas I think PCRE is also not working. Jani, which version of PHP/PCRE you are using ? Previous Comments: ------------------------------------------------------------------------ [2007-08-17 13:46:13] [EMAIL PROTECTED] Assigned to the maintainer of mbstring extension. ------------------------------------------------------------------------ [2007-08-14 09:11:37] [EMAIL PROTECTED] I get this as output: iltas, Xiltas Xiltas, Xiltas So I don't think there's anything wrong with PCRE, just mbstring stuff. ------------------------------------------------------------------------ [2007-08-14 01:28:44] arysin at gmail dot com Description: ------------ The function mb_eregi_replace() and/or function mb_ereg_replace() with 'i' option is not caseinsensitive for multibyte characters. The same problem occurs for preg_replace() with /i option. This bug was reported before twice: 1) (#39999) and was marked as Bogus stating it's not php bug. 2) (#25953) was marked as Won't fix with note "Probably the issue will be resolved in php5." As one cannot add anything to closed bug I'd like to reopen this bug here for the reason stated below: This library is not linked dynamically, on contrary its source is present in php source repository. So there's no way for php users to have this problem fixed without php itself being fixed. More than that, the version of oniguruma in php repository is pretty old so at least importing the newer version of it would be a nice try to fix this bug. Reproduce code: --------------- <? mb_internal_encoding('UTF-8'); mb_regex_encoding('UTF-8'); $pattern = ''; //s 'crown' $replace = 'X'; $subject = 'iltas, iltas'; $result = mb_eregi_replace($pattern, $replace, $subject); echo $result; $result = preg_replace("/$pattern/iu", $replace, $subject); echo $result . "\n"; ?> Expected result: ---------------- Xiltas, Xiltas Xiltas, Xiltas Actual result: -------------- iltas, Xiltas iltas, Xiltas ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=42290&edit=1