[gdal-dev] Re: WFS and -where with non-ASCII characters

Jukka Rahkonen jukka.rahkonen at mmmtike.fi
Tue Jan 3 04:01:49 EST 2012


Ari Jolma <ari.jolma <at> gmail.com> writes:

> 
> Jukka,
> 
> I get: ERROR 1: 'Hämeenkylä' not recognised as an available field.
> 
> I.e., it seems to not be confused with 'ä' - I'm using a linux, where 
> the terminal may be better with UTF8. However, the message confused me, 
> it is coming from OGR SQL engine, and it seems that the engine tries to 
> parse the constant as a field name.
> 
> The fix is to escape ', i.e., \'Hämeenkylä\', which works.
> 
> Ari

Hi Ari,

It seems to behave differently on Windows. I got your error by using -where
name=Hämeenkylä. -where name='Hämeenkylä' gives me

ERROR 1: Error returned by server : <?xml version='1.0' encoding='UTF-8'?>
<ows:ExceptionReport
 xmlns='http://www.opengis.net/ows'
 xmlns:ows='http://www.opengis.net/ows'
 xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
 xsi:schemaLocation='http://www.opengis.net/ows http://schemas.opengis.net/ows/1
.0.0/owsExceptionReport.xsd'
 version='1.1.0' language='en'>
 <ows:Exception exceptionCode='MissingParameterValue' locator='request'>
  <ows:ExceptionText>QUERY_STRING contains forbidden characters</ows:ExceptionTe
xt>
 </ows:Exception>
</ows:ExceptionReport>

I tried with -where name=\'Hämeenkylä\' and it gives this error on Windows.
Notice that 'ä' is changed to something else.

ERROR 1: SQL Expression Parsing Error: syntax error
FAILURE: SetAttributeFilter(name=\'Hõmeenkylõ\') failed.

-Jukka-




More information about the gdal-dev mailing list