On 2003/12/14, at 1:07, Rasmus Lerdorf wrote:


On Sat, 13 Dec 2003, Jan Schneider wrote:
I have to agree. While in the past it helped mb users to turn on overloading
if they wanted to use our framework, it will now break it. This is because
we now explicitely use the str*() function for byte-wise string
manipulation and their mb_*() equivalents for character-wise manipulation.
This is the only way to predict the results, the magic that is done by
overloading or transparent charset conversion is not suitable for real
production environments.

Using str*() functions for octet manipulation is fundamentally wrong.
str*() functions by definition work on character boundaries. If we need
to operate on byte boundaries we need to introduce a set of mem*()
functions.

I think single-byte users are prone to have a general assumption (indeed a superstition) that strlen() returns the number of octets and substr() cuts a portion of a string in a specified range of bytes, regardless of your conception of str*(). This sort of tendency applies to other programming languages.

Moriyoshi

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to