ID: 25669 Updated by: [EMAIL PROTECTED] Reported By: svs at ropnet dot ru -Status: Open +Status: Feedback Bug Type: Regexps related Operating System: FreeBSD 4.8 PHP Version: 4.3.3 New Comment:
Yup, if possible. The following is just a template (supposed to be put in ext/standard/tests/reg). Please try to avoid using non-ascii characters in the test case. Thanks in advance. --TEST-- Bug #25669 (eregi() with non-ascii characters) --SKIP-- <?php setlocale(LC_ALL, "de_DE.ISO8859-1") || die('SKIP de_DE.ISO8859-1 locale not sup ported by this system'); ?> --FILE-- <?php setlocale(LC_ALL, "de_DE.ISO8859-1"); var_dump((bool)eregi("\xc4\xcb\xf6", "\xe4\xeb\xd6")); var_dump((bool)eregi("\xc4", "\xe1")); var_dump((bool)preg_match("/\xc4\xcb\xf6/i", "\xe4\xeb\xd6")); var_dump((bool)preg_match("/\xc4/i", "\xe1")); ?> --EXPECT-- bool(true) bool(false) bool(true) bool(false) Previous Comments: ------------------------------------------------------------------------ [2003-09-29 12:03:34] svs at ropnet dot ru This one is OK. Should I write a test case? ------------------------------------------------------------------------ [2003-09-29 11:17:04] [EMAIL PROTECTED] Can you try this one again: http://www.voltex.jp/patches/regpatch.diff Note: This problem is known to not be reproduced with glibc and unfortunately I don't have a freebsd box atm. ------------------------------------------------------------------------ [2003-09-29 08:08:38] [EMAIL PROTECTED] Ilia: your patch doesn't seem to deal with it correctly, as isalpha() expects signed integer indeed. A char value can be any of the numbers, -128 to 127, so if you cast it to unsigned integer, you never got a value in range of 0 to 255. So you should first cast it to unsigned char, and then make it signed integer. ------------------------------------------------------------------------ [2003-09-29 06:23:14] svs at ropnet dot ru No, it does not. ------------------------------------------------------------------------ [2003-09-28 20:14:05] [EMAIL PROTECTED] Try this patch and see if it fixes the problem. http://bb.prohost.org/reg.txt ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/25669 -- Edit this bug report at http://bugs.php.net/?id=25669&edit=1