ID: 25669
Updated by: [email][/email]
Reported By: svs at ropnet dot ru
Status: Feedback
Bug Type: Regexps related
Operating System: FreeBSD 4.8
PHP Version: 4.3.3
New Comment:

And what was the configure line used to configure PHP?

Previous Comments:

[2003-09-26 09:13:01] [email][/email]

I don't think you meant to use those chars in your example
script..? Can you please add the actual ones here?


[2003-09-26 08:20:57] svs at ropnet dot ru

Even though locale is set up correctly, eregi() fails to match
international characters case-insensitively. The reason, as far
as I understand, is that code in regex/ passes a negative value to
isalpha(). This can be worked around by recompiling regex/regcomp.c
manually with -funsigned-char (assuming GCC is the compiler).

Reproduce code:
setlocale(LC_ALL, "ru_RU.KOI8-R");
echo setlocale(LC_ALL, ""), "\n";
if (eregi("я", "ЯЯ")) { echo "ok\n"; } else { echo
if (preg_match("/я/i", "ЯЯ")) { echo "ok\n"; } else {
echo "bad\n";}

Expected result:

Actual result:


Edit this bug report at [url][/url]