Re: Re: PHP Unicode support design document
| From: | Makoto Tozawa | Date: | Thu, 25 Aug 2005 02:41:14 +0000 |
| Subject: | Re: Re: PHP Unicode support design document | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-18394@lists.php.net to get a copy of this message | ||
Andrei Zmievski wrote:
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. MakotoIs 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?