ID: 40626 Updated by: [EMAIL PROTECTED] Reported By: themixa at gmail dot com -Status: Open +Status: Feedback Bug Type: PCRE related Operating System: Linux(PHP-5.1.6), Freebsd(PHP-4) PHP Version: 4.4.5 New Comment:
Please try using this CVS snapshot: http://snaps.php.net/php4-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-STABLE-latest.zip Previous Comments: ------------------------------------------------------------------------ [2007-02-25 07:24:22] themixa at gmail dot com Description: ------------ preg_match don't recognize some letters in KOI8-R. Reproduce code: --------------- <? $result = (bool)setlocale(LC_CTYPE, "ru_RU.koi8r", "ru_RU.KOI8-R"); if (!$result || preg_match('/koi8/i', setlocale(LC_CTYPE, 0)) == 0) { die("skip setlocale() failed\n"); } #FRS is First russian letter #LRS is Last russian letter echo preg_match("/^[а-яА-Я]+$/","йцукенгшщзхъфывапролджэячсмитьбю"); #patterrn with [frs-lrsFRS-LRS] and string contained full russian alphabet return 0 echo preg_match("/^[а-яА-Я]+$/","абГДек"); #patterrn with [frs-lrsFRS-LRS] and string some few russian letters (forexample, without third letter in alphabet) return 1 ?> Expected result: ---------------- First and second preg_match must return 1 Actual result: -------------- Only second preg_match must return 1 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=40626&edit=1