Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!fu-berlin.de!uni-berlin.de!news.dfncis.de!not-for-mail From: =?ISO-8859-1?Q?Sven_K=F6hler?= Newsgroups: comp.lang.java.programmer Subject: Re: exec problem is JDK 1.7.0_21 Date: Wed, 24 Apr 2013 13:11:37 +0300 Lines: 31 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: news.dfncis.de ThwqY6gmRVWXtGrPFS0N6wzozoLku/wP1n3jYZ0vVX28nkueRUB9enAU3A Cancel-Lock: sha1:P7QnBaBfNQPVTdvgShu94gldRQo= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130404 Thunderbird/17.0.5 In-Reply-To: Xref: csiph.com comp.lang.java.programmer:23619 On 04/24/2013 12:26 PM, Steven Simpson wrote: > Input line: "foo \"bar" > arg count: 2 > [0]=[foo \] > [1]=[bar] > > Input line: "foo \\"bar" > arg count: 2 > [0]=[foo \\] > [1]=[bar] > > Input line: "foo \\\"bar" > arg count: 2 > [0]=[foo \\\] > [1]=[bar] > > Backslashes are still literal, and the next quote closes the argument > regardless. Plus, the extra quote after [bar] is not literal. That's completely not what the documentation says. The documentation clearly states, that 2n or 2n+1 backslashes followed by a quote should result in backslashes. However, in your cases, not even the number of backslashes matches the documentation. Which operating system were you using? I will try to check tonight on Windows 7 using mingw64. Are you sure, you haven't mixed char and wchar strings? Have you tried CommandLineToArgvA? Regards, Sven