ID:               37661
 Updated by:       [EMAIL PROTECTED]
 Reported By:      frank at cleverbridge dot com
-Status:           Open
+Status:           Wont fix
 Bug Type:         mbstring related
 Operating System: Linux 2.6.12-1.1381_FC3 #1
 PHP Version:      5.1.4
 New Comment:

Well, that's easy:
mbstring doesn't overload str_split() and never did.
So you have to wait for PHP 6 to get proper Unicode support.


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

[2006-06-01 08:19:16] frank at cleverbridge dot com

Description:
------------
php.ini:

...
mbstring.func_overload=6;
mbstring.internal_encoding=UTF-8;
mbstring.http_input = auto;
mbstring.detect_order = ISO-8859-1,UTF-8;
mbstring.encoding_translation = On;
...

The function str_split does not work correctly with characters  >1
byte.

in my testscript the katakana character is submitted by a web form to
php. in order to make the reproduce code as easy as possible i just
copied the katakana symbol into the code.


Reproduce code:
---------------
$foo = '入';

print "StrLength: ".strlen($foo)."\n";

$I = str_split($foo);

print "array size: ".sizeof($I)."\n";
print_r($I);

Expected result:
----------------
StrLength: 1
array size: 1

Array
(
    [0] => 入;
)


Actual result:
--------------
StrLength: 1
array size: 3

Array
(
    [0] => �
    [1] => �
    [2] => �
)



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


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

Reply via email to