String length
| From: | Hayk Chamyan | Date: | Thu, 05 Feb 2004 09:19:28 +0000 |
| Subject: | String length | ||
| Groups: | php.i18n | ||
| Request: | Send a blank email to php-i18n+get-664@lists.php.net to get a copy of this message | ||
Hi All.
I've got a question regarding the length of binary strings in MB String.
Now strlen(file_get_contents('file.bin')) returns string length in bytes. However, if in
php.ini we overload the mb_strlen function in place of strlen, specifying
mbstring.internal_encoding='UTF8', the result will be wrong.
In this regard the question is whether or not a function like mb_strleninbytes expected to return
the string lenght in bytes is going to be introduced? Or, do you plan to use mb_strlen($str, ASCII)
everywhere instead?
If you want my opinion, I do not believe it makes sense to write strlen($str, ASCII) in the existing
applications.