ID:               39279
 Updated by:       [EMAIL PROTECTED]
 Reported By:      ivb at is dot ua
-Status:           Assigned
+Status:           Open
 Bug Type:         mbstring related
 Operating System: *
 PHP Version:      5CVS-2008-10-31 (CVS)
 Assigned To:      masugata


Previous Comments:
------------------------------------------------------------------------

[2007-01-22 11:42:55] ivb at is dot ua

feedback sent via e-mail

------------------------------------------------------------------------

[2007-01-22 10:20:42] [EMAIL PROTECTED]

Oh! This is a big help.
Give me, your php.ini and program.
Please send to '[EMAIL PROTECTED]'.

Thank You.


------------------------------------------------------------------------

[2006-12-27 06:13:20] ivb at is dot ua

Yes, I confirm that bug exists and I can reproduce it. I download
latest snapshot and take my example from this report. The result still
"{abc..def}{ab\1...\2ef}" instead of "{abc..def}{abc...def}".

If you need any my assistance (my php.ini f.e.) please feel free to
contact with me by my e-mail.

------------------------------------------------------------------------

[2006-12-27 04:59:35] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.2-win32-latest.zip

I have tried Reproduce code in snapshot.
But, did not become the result of your report.

Could you confirm it again?

Thank you.


------------------------------------------------------------------------

[2006-10-27 13:36:17] ivb at is dot ua

Description:
------------
mb_ereg_replace() works incorrectly if 2nd parameter is multibyte and
contains substings \\n (n - digit). It returns substing \n itself
instead of corresponding parenthesized substring.

If 2nd parameter not multibyte - \\n correctly replaced with
corresponding parenthesized substrings.

If 2nd parameter multibyte, but not contains \\n substrings -
replacement works correctly.

Reproduce code:
---------------
<?php
                                      
function a2u ( $a ) {
    return mb_convert_encoding ( $a, "UTF-16LE", "ASCII" );
    }

function u2a ( $a ) {
    return mb_convert_encoding ( $a, "ASCII", "UTF-16LE" );
    }
                                      
mb_internal_encoding ( "UTF-16LE" );
mb_regex_encoding ( "UTF-16LE" );
                                      
$str = "abc..def";
$pat = "([^\.])\.\.([^\.])";
$rep = "\\1...\\2";
                                                                
$res = mb_ereg_replace ( a2u ( $pat ), a2u ( $rep ), a2u ( $str ) );
echo "{" . $str . "}{" . u2a ( $res ) . "}\n";

?>

Expected result:
----------------
{abc..def}{abc...def}


Actual result:
--------------
{abc..def}{ab\1...\2ef}



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=39279&edit=1

Reply via email to