On Jul 19, 2007, at 4:14 PM, <[EMAIL PROTECTED]>
<[EMAIL PROTECTED]> wrote:
I don't like the idea of having a "u" prefix for Unicode strings.
It may
improve performance, and give you some level of fine grain control,
but...
- It breaks your "keep php simple" policy by introducing a lot of new
functions (ugly).
- I (plus a lot of others) have an existing php5 application which
I wish to
eventually use with Unicode, and like others, I don't want to spend
time
refactoring.
- It will also introduce bugs when programmers accidentally forget
to add
the "u" prefix when working with unicode.
If you always want to produce Unicode, I think its best to always
use a cast
or a conversion function.
Eg
$str = (unicode)(strtoupper($str));
Or
$str = unicode_val(strtoupper($str));
Good idea and it will totally work, except that it won't. strtoupper
() operates in different ways according to the type of the string
that it gets.
-Andrei
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php