Zitat von Moriyoshi Koizumi <[EMAIL PROTECTED]>:

> > The cool thing that mbstring provides is transparent overloading of
> > some
> > of the common string manipulation functions.  This means that at least
> > for
> > a subset of applications, even though they may not have been written
> > with
> > multibyte support in mind, they may in fact work perfectly in a
> > multibyte
> > environment with mbstring enabled and overloading turned on.
>
> Overloading is evil, because functions like substr() are often
> used to splice a certain length of octets byte-wise while mb_substr()
> treats the sequence of octets on a character-basis. And overloading
> cannot be turned on in scripts, this prevents us from writing portable
> scripts. There're virtually no cleaner way to do the tasks elegantly.

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.

Jan.

--
http://www.horde.org - The Horde Project
http://www.ammma.de - discover your knowledge
http://www.tip4all.de - Deine private Tippgemeinschaft

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

Reply via email to