Hi,

On Monday, February 9, 2004, 9:25:47 PM, Moriyoshi Koizumi:

MK> You can use mb_orig_strlen() where the byte-wise behaviour is
MK> needed, when strlen() is overloaded by mb_strlen(). The same applies to
MK> other mbstring counterparts (e.g. substr() - mb_substr() - mb_orig_substr()).
MK> This is an undocumented feature though.

MK> BTW, while it's found useful sometimes, it's also discouraged to use
MK> function overloading as strlen() is the only reasonable way to
MK> retrieve the length of a binary object in bytes at this time. I
MK> couldn't assure this, but sizeof() / count() will likely replace
MK> that functionality of strlen() and strlen() will probably be used
MK> solely to get the actual character count. 

I know about undocumented feature - mb_orig_* functions. And I know
that count()/sizeof() returns the number elements in array, for all
other types it returns 1.  
I suggest adding a function, which returns the length of a binary
object in bytes, in MB String module to use that function with
filesystem, network and other functions which handle binary data.  

-- 
PHP Internationalization Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to