Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:30775 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 39101 invoked by uid 1010); 11 Jul 2007 08:52:53 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 39086 invoked from network); 11 Jul 2007 08:52:52 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Jul 2007 08:52:52 -0000 Authentication-Results: pb1.pair.com header.from=tzachi@zend.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=tzachi@zend.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 212.25.124.162 as permitted sender) X-PHP-List-Original-Sender: tzachi@zend.com X-Host-Fingerprint: 212.25.124.162 mail.zend.com Windows 2000 SP4, XP SP1 Received: from [212.25.124.162] ([212.25.124.162:25072] helo=mx1.zend.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 7B/47-24679-36A94964 for ; Wed, 11 Jul 2007 04:52:52 -0400 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="windows-1255" Content-Transfer-Encoding: quoted-printable Date: Wed, 11 Jul 2007 11:55:51 +0300 Message-ID: <06B0D32C7A96544490D18AF653D6BDE501148922@il-ex1.zend.net> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [PHP-DEV] Suggestion for fixing Bug #40928 Thread-Index: AcfDNAtLUqW7qPa8SG2M6fCgSGBxCAAYlZrg References: <06B0D32C7A96544490D18AF653D6BDE501075DCE@il-ex1.zend.net> <4693F138.1060400@zend.com> To: "Stas Malyshev" Cc: Subject: RE: [PHP-DEV] Suggestion for fixing Bug #40928 From: tzachi@zend.com ("Tzachi Tager") The reason I'm doing this is because it seems that Windows parser looks = for an odd number of '"' before the escaping, otherwise the escaping = character is included in the outcome, for example: string(25) "md "test ^& echo ^%foo^%"" =3D=3D> will output a directory = called "test ^& echo ^%foo^%" While: string(31) "md "test "^&" echo "^%"foo"^%""" =3D=3D> will output a = directory called "test & echo %foo%" (I changed the php code and ran again, these are not the runs of the = cmd.exe which does the escaping internally). Which is what I wanted in the first place (and I know it looks ugly...). Tzachi. -----Original Message----- From: Stanislav Malyshev [mailto:stas@zend.com]=20 Sent: =E2 10 =E9=E5=EC=E9 2007 23:51 To: Tzachi Tager Cc: internals@lists.php.net Subject: Re: [PHP-DEV] Suggestion for fixing Bug #40928 > /en-us/ntcmds_shelloverview.mspx?mfr=3Dtrue , quoting: "You can use = most > characters as variable values, including white space. If you use the > special characters <, >, |, &, or ^, you must precede them with the > escape character (^) or quotation marks." - So all special characters > will be replaced with "^". I think you are not entirely correct here. What the quote means is that=20 if you want foo&bar, you should do either "foo&bar" or foo^&bar - not=20 replace & with "^&". --=20 Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com