Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:21852 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 36360 invoked by uid 1010); 13 Feb 2006 09:08:31 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 36345 invoked from network); 13 Feb 2006 09:08:31 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Feb 2006 09:08:31 -0000 X-Host-Fingerprint: 207.106.133.28 proof.pobox.com Linux 2.5 (sometimes 2.4) (4) Received: from ([207.106.133.28:51086] helo=proof.pobox.com) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id EE/A1-25458-E8C40F34 for ; Mon, 13 Feb 2006 04:08:30 -0500 Received: from proof (localhost [127.0.0.1]) by proof.pobox.com (Postfix) with ESMTP id E816E61290 for ; Mon, 13 Feb 2006 04:08:27 -0500 (EST) Received: from [192.168.1.3] (70-34-20-209.lmdaca.adelphia.net [70.34.20.209]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by proof.sasl.smtp.pobox.com (Postfix) with ESMTP id AD383183E0 for ; Mon, 13 Feb 2006 04:08:27 -0500 (EST) Message-ID: <43F04C6E.9070409@pobox.com> Date: Mon, 13 Feb 2006 01:07:58 -0800 User-Agent: Thunderbird 1.5 (Macintosh/20051201) MIME-Version: 1.0 To: internals@lists.php.net X-Enigmail-Version: 0.93.0.0 Content-Type: multipart/mixed; boundary="------------040502070907090505010505" Subject: [PATCH] unicode_semantics "off" evaluates to true From: brion@pobox.com (Brion Vibber) --------------040502070907090505010505 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi all, I've started cautiously poking PHP 6 so I can keep an eye on how the Unicode support is going and see what kind of work we'll eventually need to do to port MediaWiki for it... One thing I noticed right off is that this test doesn't do what you'd expect if you didn't copy in one of the sample php.ini files: if(ini_get("unicode_semantics")) { /* bla bla */ } The default value for unicode_semantics is the literal string "off", which evaluates to true although the setting really is off. Attached is a one-line patch which sets it to "0" and uses the macro STD_ZEND_INI_BOOLEAN, to match with other config settings I saw in there. This keeps it off by default but makes the ini_get evaluate to the expected false in a boolean test. - -- brion vibber (brion @ pobox.com) -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFD8ExuwRnhpk1wk44RAir6AKCPFd4tVpGJ8a0a/L2COvrQoiKnqQCgqAkY h5b6AbfY40TfQKPnRHO7xv0= =P8dd -----END PGP SIGNATURE----- --------------040502070907090505010505 Content-Type: text/plain; x-mac-type="0"; x-mac-creator="0"; name="ini-unicode_semantics-bool.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="ini-unicode_semantics-bool.diff" Index: Zend/zend.c =================================================================== RCS file: /repository/ZendEngine2/zend.c,v retrieving revision 1.333 diff -u -r1.333 zend.c --- Zend/zend.c 8 Feb 2006 18:52:13 -0000 1.333 +++ Zend/zend.c 13 Feb 2006 08:53:35 -0000 @@ -197,7 +197,7 @@ STD_ZEND_INI_BOOLEAN("zend.ze1_compatibility_mode", "0", ZEND_INI_ALL, OnUpdateBool, ze1_compatibility_mode, zend_executor_globals, executor_globals) /* Unicode .ini entries */ - STD_ZEND_INI_ENTRY("unicode_semantics", "off", ZEND_INI_SYSTEM, OnUpdateBool, unicode, zend_unicode_globals, unicode_globals) + STD_ZEND_INI_BOOLEAN("unicode_semantics", "0", ZEND_INI_SYSTEM, OnUpdateBool, unicode, zend_unicode_globals, unicode_globals) STD_ZEND_INI_ENTRY("unicode.fallback_encoding", NULL, ZEND_INI_ALL, OnUpdateEncoding, fallback_encoding_conv, zend_unicode_globals, unicode_globals) STD_ZEND_INI_ENTRY("unicode.runtime_encoding", NULL, ZEND_INI_ALL, OnUpdateEncoding, runtime_encoding_conv, zend_unicode_globals, unicode_globals) STD_ZEND_INI_ENTRY("unicode.script_encoding", NULL, ZEND_INI_ALL, OnUpdateEncoding, script_encoding_conv, zend_unicode_globals, unicode_globals) --------------040502070907090505010505--