#49399 [Fbk->Opn]: mb_ereg_replace() '\b' fails with mbstrings

2009-12-13 Thread manfred at mabuweb dot com
 ID:   49399
 User updated by:  manfred at mabuweb dot com
 Reported By:  manfred at mabuweb dot com
-Status:   Feedback
+Status:   Open
 Bug Type: mbstring related
 Operating System: linux
 PHP Version:  5.2.10
 Assigned To:  moriyoshi
 New Comment:

Good question!

php -i |grep mbstring
mbstring.detect_order => no value => no value
mbstring.encoding_translation => Off => Off
mbstring.func_overload => 0 => 0
mbstring.http_input => pass => pass
mbstring.http_output => pass => pass
mbstring.internal_encoding => ISO-8859-1 => no value
mbstring.language => neutral => neutral
mbstring.substitute_character => no value => no value

If I change to UTF-8 everything seems to work as expected:
ini_set('mbstring.internal_encoding', 'UTF-8');


Previous Comments:


[2009-12-13 20:34:09] j...@php.net

Exactly what encodings are you using? (check phpinfo() for mbstring.*)

# php -i |grep mbstring\\.
mbstring.detect_order => no value => no value
mbstring.encoding_translation => Off => Off
mbstring.func_overload => 7 => 7
mbstring.http_input => pass => pass
mbstring.http_output => pass => pass
mbstring.internal_encoding => UTF-8 => UTF-8
mbstring.language => neutral => neutral
mbstring.strict_detection => Off => Off
mbstring.substitute_character => no value => no value




[2009-12-13 20:32:38] j...@php.net

I can't:

# php -v
PHP 5.2.12RC2-dev (cli) (built: Nov 22 2009 02:36:43)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies
# php t.php
Días
Días





[2009-12-13 20:32:12] manfred at mabuweb dot com

I've no 5.3 version to try, but I just tried in 5.2.11 and can
reproduce the error.



[2009-12-13 19:32:46] fel...@php.net

I can reproduce it only in 5.2.



[2009-08-28 13:17:16] manfred at mabuweb dot com

Description:

mb_ereg_replace() and mb_eregi_replace() misinterpretate MBchars as
word end.

Reproduce code:
---
  $pattern = '\bas\b';
  $string = 'Días';
  echo $string.'';
  echo mb_ereg_replace($pattern,  '', $string);


Expected result:

Días
Días


Actual result:
--
Días
Dí






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



#49399 [Asn]: mb_ereg_replace() '\b' fails with mbstrings

2009-12-13 Thread manfred at mabuweb dot com
 ID:   49399
 User updated by:  manfred at mabuweb dot com
 Reported By:  manfred at mabuweb dot com
 Status:   Assigned
 Bug Type: mbstring related
 Operating System: linux
-PHP Version:  5.2.10
+PHP Version:  5.2.11
 Assigned To:  moriyoshi
 New Comment:

I've no 5.3 version to try, but I just tried in 5.2.11 and can
reproduce the error.


Previous Comments:


[2009-12-13 19:32:46] fel...@php.net

I can reproduce it only in 5.2.



[2009-08-28 13:17:16] manfred at mabuweb dot com

Description:

mb_ereg_replace() and mb_eregi_replace() misinterpretate MBchars as
word end.

Reproduce code:
---
  $pattern = '\bas\b';
  $string = 'Días';
  echo $string.'';
  echo mb_ereg_replace($pattern,  '', $string);


Expected result:

Días
Días


Actual result:
--
Días
Dí






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



#49399 [NEW]: mb_ereg_replace() '\b' fails with mbstrings

2009-08-28 Thread manfred at mabuweb dot com
From: manfred at mabuweb dot com
Operating system: linux
PHP version:  5.2.10
PHP Bug Type: mbstring related
Bug description:  mb_ereg_replace() '\b' fails with mbstrings

Description:

mb_ereg_replace() and mb_eregi_replace() misinterpretate MBchars as word
end.

Reproduce code:
---
  $pattern = '\bas\b';
  $string = 'Días';
  echo $string.'';
  echo mb_ereg_replace($pattern,  '', $string);


Expected result:

Días
Días


Actual result:
--
Días
Dí


-- 
Edit bug report at http://bugs.php.net/?id=49399&edit=1
-- 
Try a snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=49399&r=trysnapshot52
Try a snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=49399&r=trysnapshot53
Try a snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=49399&r=trysnapshot60
Fixed in SVN:
http://bugs.php.net/fix.php?id=49399&r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=49399&r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=49399&r=alreadyfixed
Need backtrace:  
http://bugs.php.net/fix.php?id=49399&r=needtrace
Need Reproduce Script:   
http://bugs.php.net/fix.php?id=49399&r=needscript
Try newer version:   
http://bugs.php.net/fix.php?id=49399&r=oldversion
Not developer issue: 
http://bugs.php.net/fix.php?id=49399&r=support
Expected behavior:   
http://bugs.php.net/fix.php?id=49399&r=notwrong
Not enough info: 
http://bugs.php.net/fix.php?id=49399&r=notenoughinfo
Submitted twice: 
http://bugs.php.net/fix.php?id=49399&r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=49399&r=globals
PHP 4 support discontinued:  http://bugs.php.net/fix.php?id=49399&r=php4
Daylight Savings:http://bugs.php.net/fix.php?id=49399&r=dst
IIS Stability:   
http://bugs.php.net/fix.php?id=49399&r=isapi
Install GNU Sed: 
http://bugs.php.net/fix.php?id=49399&r=gnused
Floating point limitations:  
http://bugs.php.net/fix.php?id=49399&r=float
No Zend Extensions:  
http://bugs.php.net/fix.php?id=49399&r=nozend
MySQL Configuration Error:   
http://bugs.php.net/fix.php?id=49399&r=mysqlcfg