[gdal-dev] WFS driver does not do URL-encoding right

Even Rouault even.rouault at mines-paris.org
Fri Aug 17 02:47:20 PDT 2012


Selon xavier lhomme <lhomme.xavier at gmail.com>:

> Hi
>  I tried to add to the function SetAttributeFirlter the following  filter :
>  nam = 'MY#FIRST TEST ON'   but it doesn't work.
>  then I tried    HttpUtility.UrlEncode( ) but it doesn't work too.
>
>  If I encode my string like this  nam = 'MY%23 FIRST+TEST+ON ' it works;
>
>  Could you explain a bit more what we need to encode ?

You shouldn't to have to do any encoding on the side of the user using the OGR
API (and if you do so, then the WFS driver might again URL-encode what you would
have already encoded... definitely not what you want). This must be done by the
WFS driver when composing the request to the WFS server. I've pushed a few fixes
to trunk 2 days ago to improve the URL encoding. Perhaps they will fix your
issue.

>
> xav
>




More information about the gdal-dev mailing list