Andrei Zmievski wrote:
Is there any way to keep the byte semantics (in oppose to unicode
semantics)
only for the existing functions? For example, the Oracle 8 functions
can be
configured to use utf-8 for the character encoding of strings. In
order for
them to work properly, fundamental functions, which Oracle 8 function
call,
have to behave in byte samentics. And if they work properly when the
unicode
semantics switch is turned on, by setting the runtime_encoding to utf-8,
they can be called by uncode applications.
I couldn't parse this on the first try. Could you restate this?
Say there is a function which calls strlen($s) expecting it returns byte
size of $s,
and it is working fine when $s constains multibyte characters. For example,
the function expects strlen('áéí') returns 6 when the encoding is utf-8.
If this function is called by Uniocde ready applications on
Unicode-enabled PHP,
it will fall into error because strlen('áéí') will return 3.
Is there any way to let strlen('áéí') return 6 only when it is called by
the existing function?
Hope I explained well this time.
Makoto
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php