#19690 [Opn]: mb_split is broken
| From: | jc at mega-bucks dot co dot jp | Date: | Tue, 01 Oct 2002 13:52:39 +0000 |
| Subject: | #19690 [Opn]: mb_split is broken | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-20926@lists.php.net to get a copy of this message | ||
ID: 19690
User updated by: jc@mega-bucks.co.jp
Reported By: jc@mega-bucks.co.jp
Status: Open
Bug Type: mbstring related
Operating System: Red Hat Linux 7.2
PHP Version: 4.2.3
New Comment:
Here are my PHP settings in case you need to see them
Multibyte (Japanese) Support enabled
multibyte regex support enabled
Directive Local Value Master Value
mbstring.detect_order auto auto
mbstring.func_overload 0 0
mbstring.http_input auto auto
mbstring.http_output no value no value
mbstring.internal_encoding EUC-JP EUC-JP
mbstring.substitute_character no value no value
Previous Comments:
------------------------------------------------------------------------
[2002-10-01 08:44:54] jc@mega-bucks.co.jp
The following output and code show that mb_split does not work:
OUTPUT:
REGEX encoding is EUC-JP
encoding is ASCII
v is One two
COUNT: 9
a word: **
a word: **
a word: **
a word: **
a word: **
a word: **
a word: **
a word: **
a word: **
CODE:
$aWords = array();
echo " REGEX encoding is ". mb_regex_encoding()."<BR>";
$v ="One two";
echo "encoding is ".mb_detect_encoding($v)."<BR>";
echo "v is $v <BR>";
$aWords = mb_split(" ",$v);
echo "COUNT: ".count($aWords)."<BR>";
foreach($aWords as $w) {
echo "a word: *$w*<BR>";
}
exit;
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=19690&edit=1