String length

Hayk Chamyan <[email protected]>
Newsgroups gmane.comp.php.internationalization
Organization Softerra LLC
Message-ID <[email protected]>
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.

-- 
PHP Internationalization Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.