Re: [gdal-dev] CPLEscapeString URL - encoding characters that don't need to be encoded

2014-06-19 Thread Timothy Astle
I've provided a patch and some context in this ticket. http://trac.osgeo.org/gdal/ticket/5526 Thank you for your feedback! Tim On 18/06/2014 2:02 PM, Timothy Astle wrote: Yes, that could be possible. Aweb server should try to URL decode anything that has been encoded, that is, any %xx tok

Re: [gdal-dev] CPLEscapeString URL - encoding characters that don't need to be encoded

2014-06-18 Thread Timothy Astle
Yes, that could be possible. Aweb server should try to URL decode anything that has been encoded, that is, any %xx token. But I have hit one server that doesn't do this, and that's why I'm here. It doesn't seem to be doing any decoding. :( Tim On 18/06/2014 10:18 AM, Even Rouault wrote:

Re: [gdal-dev] CPLEscapeString URL - encoding characters that don't need to be encoded

2014-06-18 Thread Even Rouault
Le mercredi 18 juin 2014 14:47:47, Timothy Astle a écrit : > I was thinking something like the following: > > if( (pszInput[iIn] >= 'a' && pszInput[iIn] <= 'z') > > || (pszInput[iIn] >= 'A' && pszInput[iIn] <= 'Z') > || (pszInput[iIn] >= '0' && ps

Re: [gdal-dev] CPLEscapeString URL - encoding characters that don't need to be encoded

2014-06-18 Thread Timothy Astle
I was thinking something like the following: if( (pszInput[iIn] >= 'a' && pszInput[iIn] <= 'z') || (pszInput[iIn] >= 'A' && pszInput[iIn] <= 'Z') || (pszInput[iIn] >= '0' && pszInput[iIn] <= '9') -|| pszInput[iIn] == '_' || pszInput[i

Re: [gdal-dev] CPLEscapeString URL - encoding characters that don't need to be encoded

2014-06-17 Thread Even Rouault
Le lundi 16 juin 2014 14:20:59, Timothy Astle a écrit : > Hi all, > > Does anyone know why CPLEscapeString > (https://svn.osgeo.org/gdal/trunk/gdal/port/cpl_string.cpp) character > encodes characters that are valid as-is according to > http://www.ietf.org/rfc/rfc1738.txt? > > I just hit a situati

[gdal-dev] CPLEscapeString URL - encoding characters that don't need to be encoded

2014-06-16 Thread Timothy Astle
Hi all, Does anyone know why CPLEscapeString (https://svn.osgeo.org/gdal/trunk/gdal/port/cpl_string.cpp) character encodes characters that are valid as-is according to http://www.ietf.org/rfc/rfc1738.txt? I just hit a situation where I noticed the WMS driver is converting hyphens to %2D for