[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-gawk] Percent Signs in External Commands on Windows

From: Eli Zaretskii
Subject: Re: [bug-gawk] Percent Signs in External Commands on Windows
Date: Mon, 09 Apr 2012 16:39:56 +0300

> Date: Mon, 9 Apr 2012 05:58:36 -0700 (PDT)
> From: David Millis <address@hidden>
> Cc: address@hidden
> In hindsight, I think GnuWin32 took the less problematic route.

I don't agree.  The GnuWin32 way was simply unworkable, because
(a) there are differences in handling quoted arguments between the
Windows runtime libraries supplied with Windows Vista and later, and
the runtime in older Windows versions, like XP; and (b) there are
certain situations where you simply _cannot_ get the desired effect by
_any_ reasonable use of quotes, due to misfeatures of how quotes are
handled by the Windows APIs and the startup code of programs you
invoke via the 'system' function.

> It's much trickier to selectively escape certain percents by doubling them up 
> than to concatenate a leading and trailing quote to the whole string.

As I said, quoting simply won't work in general, so it's a

As for tricky escaping of percents, let's see how tricky is that.  I'd
say, doubling every % will solve 99% of problems.  The only problem
that will be left is the use of %FOO% where FOO is an existing
environment variable.  Am I right?

(Btw, the Windows port of GNU Make disregards this issue altogether,
and I have yet to hear a single complaint about that.)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]