[Proj] quoting +nadgrids ?

Eric Miller EMiller at dfg.ca.gov
Mon Aug 2 17:02:11 EST 2010


>>> On 8/2/2010 at 12:52 PM, Glynn Clements <glynn at gclements.plus.com> wrote:

> Eric Miller 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.
> 
> This issue has nothing (directly) to do with the shell on any
> platform. It's simply an issue of how to represent a list of strings
> as a single string.

I understood the OP was getting the "projection definition" so that it could be used by cs2cs at some later date.
"""
So when this string is passed as a CRS to cs2cs it only reads as far as the "C:\Program" part for the grid file and all goes downhill fast from there.
"""
He didn't say anything about the shell, but I assumed there'd be one if cs2cs was being used.

> Also, URL encoding can encode any character. The choice of which
> characters are encoded doesn't affect the decoding algorithm.

Perhaps it is better to call it percent encoding for the general case.




More information about the Proj mailing list