From: Erik Faye-Lund Date: Thu, 14 Oct 2010 00:47:01 GMT Subject: Re: [msysGit] Re: [PATCH v4 02/15] mingw: implement syslog Message-ID: In-Reply-To: On Wed, Oct 13, 2010 at 11:17 PM, Pat Thoyts wrote: > On 13 October 2010 20:23, Eric Sunshine wrote: >> On 10/13/2010 08:36 AM, Erik Faye-Lund wrote: >>> >>> On Tue, Oct 12, 2010 at 12:37 AM, Jonathan Nieder >>>  wrote: >>>> >>>> Erik Faye-Lund wrote: >>>> >>>>> The string gets inlined into itself (with a limit of 100 expansions) >>>>> leading to string like "foo %1 bar" becoming "foo foo foo ... foo %1 >>>>> bar bar bar ... bar". With our expansion, it becomes "foo % 1 bar" >>>>> instead. >>>> >>>> Ah, ok.  Sounds like there is no need to worry about requests for "%%1" >>>> etc.  Thanks for explaining. >>>> >>> Actually, %%1 is a bit of a tricky one. It seems that %%1 is used to >>> escape %1 on Windows 7, but not on earlier Windows version. I did test >>> this on Vista an XP earlier, but I'll re-test again later and report >>> back, in case my earlier tests were flawed. >> Meh. Windows XP does not escape %%1 to %1, it has the same expansion-problem as %1 does. In other words, my old assertion is still valid. >> If that worked universally, escaping '%1' to '%%1' certainly would be nicer >> than '% 1'. (More generally, escape '%n' to '%%n', where n is a number.) It >> also would simplify the log message. >> >>> Can %%1 occur in an IPv6 address at all? If not, I'm tempted to not >>> handle it (unless it turns out I was wrong about %%1-escaping on Vista >>> and XP). >> >> According to sources I have studied, %%1 would be unlikely (or perhaps >> invalid) in IPv6 addresses. >> >> http://en.wikipedia.org/wiki/IPv6_address#Link-local_addresses_and_zone_indices > > Not on windows. Try ipconfig: >   Link-local IPv6 Address . . . . . : fe80::c9fb:7840:66f5:b2e9%13 >   Default Gateway . . . . . . . . . : fe80::20c:76ff:fe1e:e00%11 > and so on. Its an interface fragment or something. > > However - we really don't care. You can just substitute these to > spaces and no-one will care. Keep it simple. > Uh, none of these contain a double percent-sign. Am I misunderstanding what you're replying to?