Ask a Question related to PHP Bugs, Design and Development.
-
themixa at gmail dot com #1
#40626 [NEW]: preg_match and koi8-r
From: themixa at gmail dot com
Operating system: Linux(PHP-5.1.6), Freebsd(PHP-4)
PHP version: 4.4.5
PHP Bug Type: PCRE related
Bug description: preg_match and koi8-r
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 bug report at [url]http://bugs.php.net/?id=40626&edit=1[/url]
--
Try a CVS snapshot (PHP 4.4): [url]http://bugs.php.net/fix.php?id=40626&r=trysnapshot44[/url]
Try a CVS snapshot (PHP 5.2): [url]http://bugs.php.net/fix.php?id=40626&r=trysnapshot52[/url]
Try a CVS snapshot (PHP 6.0): [url]http://bugs.php.net/fix.php?id=40626&r=trysnapshot60[/url]
Fixed in CVS: [url]http://bugs.php.net/fix.php?id=40626&r=fixedcvs[/url]
Fixed in release: [url]http://bugs.php.net/fix.php?id=40626&r=alreadyfixed[/url]
Need backtrace: [url]http://bugs.php.net/fix.php?id=40626&r=needtrace[/url]
Need Reproduce Script: [url]http://bugs.php.net/fix.php?id=40626&r=needscript[/url]
Try newer version: [url]http://bugs.php.net/fix.php?id=40626&r=oldversion[/url]
Not developer issue: [url]http://bugs.php.net/fix.php?id=40626&r=support[/url]
Expected behavior: [url]http://bugs.php.net/fix.php?id=40626&r=notwrong[/url]
Not enough info: [url]http://bugs.php.net/fix.php?id=40626&r=notenoughinfo[/url]
Submitted twice: [url]http://bugs.php.net/fix.php?id=40626&r=submittedtwice[/url]
register_globals: [url]http://bugs.php.net/fix.php?id=40626&r=globals[/url]
PHP 3 support discontinued: [url]http://bugs.php.net/fix.php?id=40626&r=php3[/url]
Daylight Savings: [url]http://bugs.php.net/fix.php?id=40626&r=dst[/url]
IIS Stability: [url]http://bugs.php.net/fix.php?id=40626&r=isapi[/url]
Install GNU Sed: [url]http://bugs.php.net/fix.php?id=40626&r=gnused[/url]
Floating point limitations: [url]http://bugs.php.net/fix.php?id=40626&r=float[/url]
No Zend Extensions: [url]http://bugs.php.net/fix.php?id=40626&r=nozend[/url]
MySQL Configuration Error: [url]http://bugs.php.net/fix.php?id=40626&r=mysqlcfg[/url]
themixa at gmail dot com Guest
-
trouble with preg_match()
Can anyone tell me why the following evaluates to false preg_match("/^.*X$/",$composited_rod_end_head_p) when ... -
preg_match
Hello, I would like to split a String containing ingredience with additional assigned footnotes... my problem I only get the first ingredience... -
preg_match allowing a-z AND å ä ö ü
I've been searching the net and Google news groups for a preg_match expression that will return true on strings containing (uppercase and... -
preg_match bug
Hey I wanted to see if anyone was getting the same problem. Using preg_match in the following pattern: "/<tr bgcolor="#FFFFFF">(.|\n)+?<\/tr>/" ... -
preg_match issue
I have a function that checks the syntax of a string using preg_match. This function is used in a loop and always hangs on the same string (7 out of... -
nlopess@php.net #2
#40626 [Opn->Fbk]: preg_match and koi8-r
ID: 40626
Updated by: [email]nlopess@php.net[/email]
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:
[url]http://snaps.php.net/php4-STABLE-latest.tar.gz[/url]
For Windows:
[url]http://snaps.php.net/win32/php4-win32-STABLE-latest.zip[/url]
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 [url]http://bugs.php.net/?id=40626&edit=1[/url]
nlopess@php.net Guest



Reply With Quote

