Re: Unicode progress [Was: unicode.semantics ad infinitum]

From: Date: Wed, 21 May 2008 10:45:47 +0000
Subject: Re: Unicode progress [Was: unicode.semantics ad infinitum]
References: 1 2 3 4 5 6 7  Groups: php.internals 
Request: Send a blank email to internals+get-37769@lists.php.net to get a copy of this message
On 21.05.2008 00:21, Steph Fox wrote:
I think the test script and ZE problems should be resolved first...
And to do that we need to drop the Unicode Switch =)
plus I just discovered that my php.ini isn't being found when I run commandline tests (e.g. php -r "var_dump(strcasecmp());" doesn't throw an error unless I explicitly set error_reporting from the commandline, despite having E_ALL|E_STRICT in the INI). These are basic things, nobody can really go much further until they're fixed.
Your php.ini is being found & read allright, the problem is that the INI scanner looks for _string_ constants, while all constants are registered as _unicode_ constants in Unicode mode. So it fails to find E_ALL constant and ends up with atoi("E_ALL"), which is 0. I committed a fix for this one a minute ago. The broken function names in error messages are easy to fix too, as soon as we drop the Switch - functions in Unicode mode are registered using their Unicode names, but then a weird thing happens: zend_register_standard_ini_entries() makes Unicode copies of function/class/constant tables (ignoring the fact that they are already Unicode ones), this is why you see only the first character in function names. The patch is as easy as this: http://dev.daylessday.org/diff/fix_unicode_function_names.diff I didn't commit this one yet as I didn't investigate how it would affect non-Unicode mode (and whether I should worry about non-Unicode mode at all). -- Wbr, Antony Dovgal

« previous php.internals (#37769) next »