Re: WFS and -where with non-ASCII characters
Even Rouault <even.rouault <at> mines-paris.org>
2012-01-03 09:59:57 GMT
Selon Ari Jolma <ari.jolma <at> gmail.com>:
> 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.
On Linux, I suspect that the single quotes must be removed by your shell (hence
the SQL engine believes that it must test equality between a column and another
column). So the solution is to escape the single-quote, or to
double-quote the whole stuff:
On Windows, there might perhaps be a problem with the shell passing strings in
the local code page (CP1252 or whatever variant of it that is used in
Finland), whereas the WFS server perhaps expect it to be UTF-8. I'm not sure
which encoding we are supposed to send through Filter Encoding in KVP, and I'm
not sure how it is escaped (or not) currently. But if it works with Linux, it is
likely not an escaping problem, but one related with the encoding. Sending the
Filter Encoding as a POST content will likely get rid of the encoding problem
from a theoritical point of view, but there would still be the problem of
Windows passing non-UTF8 strings to the command line utilities