[Proj] quoting +nadgrids ?

Eric Miller EMiller at dfg.ca.gov
Mon Aug 2 10:31:16 EST 2010


>>> On 8/1/2010 at 11:04 AM, Glynn Clements <glynn at gclements.plus.com> wrote:

> Frank Warmerdam wrote:
> 
>> I had proposed the @@@space@@@ idea just because it wouldn't be interpreted
>> anywhere else, though it is somewhat peculiar.  Can you, or anyone,
>> provide an argument for a different approach?  Were you suggesting url
>> encoding because it was easily extended to other escaping operations?
> 
> Mostly because it's already known, can be used to escape arbitrary
> characters, the % sign seems (to me) unlikely to occur in an argument,
> and the worst case for the size of an escaped string isn't too bad
> (three times the size of the original string).
> 
> [Needless to say, the first question which crossed my mind regarding
> the @@@space@@@ idea was: what happens if the text "@@@space@@@"
> occurs in an argument value? Replacing each @ with @@@atsign@@@ would
> get ugly. But that's more of a theoretical issue than a practical
> one.]

For whatever reason, the escape character for cmd.exe is the caret ^.  Besides the space character, the following characters must be escaped: <, >, |, &, and ^ (of course).  Obviously, if you use this escaping mechanism on Windows, the result won't be portable. URL encoding would not escape the ampersand, which could be trouble.

http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/ntcmds_shelloverview.mspx?mfr=true 
-- 

Eric G. Miller
Staff Programmer
CA Dept. of Fish & Game





More information about the Proj mailing list