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("/^[&#1072;-&#1103;&#1040;-&#1071;]+$/","&#1081;&#1094;&#1091;&#1082;&#1077;&#1085;&#1075;&#1096;&#1097;&#1079;&#1093;&#1098;&#1092;&#1099;&#1074;&#1072;&#1087;&#1088;&#1086;&#1083;&#1076;&#1078;&#1101;&#1103;&#1095;&#1089;&#1084;&#1080;&#1090;&#1100;&#1073;&#1102;");
#patterrn with [frs-lrsFRS-LRS] and string contained full russian
alphabet return 0
echo
preg_match("/^[&#1072;-&#1103;&#1040;-&#1071;]+$/","&#1072;&#1073;&#1043;&#1044;&#1077;&#1082;");
#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

Reply via email to