ID:               34113
 Updated by:       [EMAIL PROTECTED]
 Reported By:      mlmlml at lily dot freemail dot ne dot jp
-Status:           Open
+Status:           Feedback
 Bug Type:         mbstring related
 Operating System: windows 2000 server
 PHP Version:      4.3.11
 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:
------------------------------------------------------------------------

[2005-08-13 01:15:17] mlmlml at lily dot freemail dot ne dot jp

Description:
------------
When "mb_ereg_replace" is used under "UTF-8" source environment, it
does not seem to recognize gmulti-byte spaceh (zenkaku-space in
Japanese).   The same code runs correctly under gEUC-JPh source
environment, so I supposed this was something buggy rather than
mis-usage of the function.


[mbstring]
mbstring.language = Japanese
mbstring.internal_encoding = UTF-8
mbstring.http_input = auto
mbstring.http_output = UTF-8
;mbstring.encoding_translation = Off
mbstring.detect_order = auto
mbstring.substitute_character = none;
;mbstring.func_overload = 0


Reproduce code:
---------------
<?php
    /*
    the all three var_dump()s "UTF-8", and this verifies 
    the source is actually run under "UTF-8"
    */
    var_dump(mb_regex_encoding());
    var_dump(mb_internal_encoding());

    mb_regex_encoding(mb_internal_encoding());
    var_dump(mb_regex_encoding());

    /*
    Although this var_dump should give 
    
    "[EMAIL PROTECTED]" 
    
    by recognising "@"(multi-byte space), 
    when it is run under "UTF-8", it gives 
    
    "****************".  
    
    This assures that the "multi-byte space" is not 
    recognised as it should.
    */
    $string = "[EMAIL PROTECTED]";
    var_dump(mb_ereg_replace('[EMAIL PROTECTED]', '*', $string));
?>

Expected result:
----------------
multi-byte space should not be converted to "*" in the reproduce code
since the regular expression is "[EMAIL PROTECTED]".

Actual result:
--------------
multi-byte space is ignored and converted to "*".


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


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

Reply via email to