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

Ari Jolma ari.jolma at gmail.com
Tue Jan 3 08:07:10 EST 2012

On 01/03/2012 02:45 PM, Mateusz Łoskot wrote:
> On 3 January 2012 11:07, Jukka Rahkonen<jukka.rahkonen at mmmtike.fi>  wrote:
>> I took the successful query sent by Ari from the TinyOWS log and copied it
>> literally into Windows and this way it works:
>> -where name='Hämeenkylä'
> Windows Command Prompt can work with UTF-8 characters if you change
> codepage to UTF-8:
> 0) Open new prompt (cmd.exe)
> 1) Change font to Lucida Concole
> 3) chcp 65001
> And OGR can consume filter without problems:
> -where "name=\"Hämeenkylä\""
> Note, the \"\" is needed to not to confuse OGR SQL compilers,
> otherwise value Hämeenkylä
> will be parsed as OGR SQL type SNT_COLUMN instead of SNT_CONSTANT for
> field value.

Is that really so? At least in PostgreSQL " and ' have different uses. " 
is used for column names, which are not all lowercase and without 
special characters and ' is used for string constants (as in this case).


More information about the gdal-dev mailing list