Re: Unicode patch

From: Date: Wed, 11 Jan 2006 23:43:25 +0000
Subject: Re: Unicode patch
References: 1  Groups: php.i18n 
Request: Send a blank email to php-i18n+get-897@lists.php.net to get a copy of this message
Moving this discussion to php-i18n list. I guess a simple search and replace could do it except for the functions that do not use this macro and set the type directly instead, but there are few of them probably. I say we should apply the patch and then fix up the RETURN_STRING() macros and continue from there. -Andrei On Jan 10, 2006, at 9:43 PM, Dmitry Stogov wrote:
the simplest way to make "old" function comatible with unicode - substitute RETURN_STRING() by RETURN_RT_STRING(). Thanks. Dmitry.
-----Original Message----- From: Andrei Zmievski [mailto:andrei@gravitonic.com] Sent: Wednesday, January 11, 2006 12:55 AM To: Dmitry Stogov Cc: Zeev Suraski; Rasmus Lerdorf; Andi Gutmans Subject: Re: Unicode patch Hi Dmitry, I will review it as soon as possible. The behavior you described is exactly what we talked about at the meeting and it is also what my message to php-i18n list was about (which no one replied to). I see solutions to this: 1) Don't do anything. The breakage should be a sufficiently high motivator for people to start upgrading the functions. 2) Implement a stop-gap measure, while functions are being upgraded. Basically, make the engine auto-convert the return value of the function to IS_UNICODE. We'd need a way to indicate that the return value is a text value to avoid converting functions that are supposed to return IS_BINARY. -Andrei On Jan 9, 2006, at 3:53 AM, Dmitry Stogov wrote:
Hi Andrei, I made a patch that removes IS_BINARY data type, but I
don't think, it
will give a lot of advantages in maintainability Now IS_STRING behave as IS_BINARY in unicode mode. So IS_STRING and IS_UNICODE are incompatible and all old functions must be upgraded. For example the following code causes a fatal error in unicode mode. echo "hello".sprintf("%s","world"); Note: I didn't remove old behavior from zend_hash. In unicode mode string keys are converted to unicode ones automatic. (This should be removed on next step). Please review the patch and make your notes about it. Thanks. Dmitry. <unicode-6.diff.gz>


« previous php.i18n (#897) next »