[Geoserver-users] Behaviour of filters with Greek characters

Dear all,

I am sending WFS getFeature requests with the browser (Firefox) to geoserver 1.5.3 using some filters inside. For the usual occidental characters it works fine, but with greek characters geoserver just skips the filter parameter in the request and therefore it returns all the results. I have encoded everything as UTF-8 (up to my knowledge, maybe there is something else to be encoded): the browser, the request (Tomcat connector), the character set of geoserver and the database (Postgis).

My request is as follows:

http://localhost:8083/geoserver/wfs?request=GetFeature&service=WFS&version=1.0.0&maxfeatures=20&typename=safe:location&filter=%3CFilter%3E%3CAnd%3E%3CPropertyIsLike%20wildCard%3D%22*%22%20singleChar%3D%22.%22%20escape%3D%22%5C%22%3E%3CPropertyName%3Esafe%3Alocation_town_village_settlement_camp%3C/PropertyName%3E%3CLiteral%3E%3C%21%5BCDATA%5B%u03C1%u03B5%u03C4%u03B9%u03C5%u03B8%u03B8%u03C5%5D%5D%3E%3C/Literal%3E%3C/PropertyIsLike%3E%3C/And%3E%3C/Filter%3E

The Greek characters encoded there are: ρετιυθθυ.

The log show the following messages:

1998242 [FINA] org.vfny.geoserver.servlets.AbstractService - reading request: request=GetFeature&service=WFS&version=1.0.0&maxfeatures=20&typename=safe:location&filter=%3CFilter%3E%3CAnd%3E%3CPropertyIsLike%20wildCard%3D%22*%22%20singleChar%3D%22.%22%20escape%3D%22%5C%22%3E%3CPropertyName%3Esafe%3Alocation_town_village_settlement_camp%3C/PropertyName%3E%3CLiteral%3E%3C%21%5BCDATA%5B%u03C1%u03B5%u03C4%u03B9%u03C5%u03B8%u03B8%u03C5%5D%5D%3E%3C/Literal%3E%3C/PropertyIsLike%3E%3C/And%3E%3C/Filter%3E
1998242 [LA M┴S FINA] org.vfny.geoserver.wfs.requests.readers.GetFeatureKvpReader - setting global request parameters
1998242 [LA M┴S FINA] org.vfny.geoserver.wfs.requests.readers.GetFeatureKvpReader - setting query request parameters
1998242 [LA M┴S FINA] org.vfny.geoserver.util.requests.readers.KvpRequestReader - adding simple element safe:location
1998242 [LA M┴S FINA] org.vfny.geoserver.util.requests.readers.KvpRequestReader - reading nested: null
1998242 [LA M┴S FINA] org.vfny.geoserver.util.requests.readers.KvpRequestReader - found implicit all requested
1998242 [LA M┴S FINA] org.vfny.geoserver.wfs.requests.readers.GetFeatureKvpReader - setting query request parameters
1998242 [LA M┴S FINA] org.vfny.geoserver.wfs.requests.readers.GetFeatureKvpReader - setting properties: 0
1998242 [LA M┴S FINA] org.vfny.geoserver.wfs.requests.readers.GetFeatureKvpReader - setting filters: 0
1998242 [LA M┴S FINA] org.vfny.geoserver.wfs.requests.readers.GetFeatureKvpReader - query filter: null
1998242 [M┴S FINA] org.vfny.geoserver.servlets.AbstractService - serviceRequest provided with HttpServletRequest: org.apache.coyote.tomcat5.CoyoteRequestFacade@anonymised.com
1998242 [INFO] org.vfny.geoserver.servlets.AbstractService - handling request:
Request: null
output format:GML2
max features:20
version:1.0.0
queries:
Query
feature type: safe:location
[properties: ALL ]

Could somebody give me a hint about how to get this working?.

Thanks,

Héctor.


Este mensaje, y en su caso, cualquier fichero anexo al mismo, puede contener informaci?n clasificada por su emisor como confidencial en el marco de su Sistema de Gesti?n de Seguridad de la Informaci?n siendo para uso exclusivo del destinatario, quedando prohibida su divulgaci?n copia o distribuci?n a terceros sin la autorizaci?n expresa del remitente. Si Vd. ha recibido este mensaje err?neamente, se ruega lo notifique al remitente y proceda a su borrado. Gracias por su colaboraci?n.


This message including any attachments may contain confidential information, according to our Information Security Management System, and intended solely for a specific individual to whom they are addressed. Any unauthorised copy, disclosure or distribution of this message is strictly forbidden. If you have received this transmission in error, please notify the sender immediately and delete it.


Hi Héctor,

From the log you provided it does indeed look like the filter is ignored

in the request. I got a slightly different behavior in that the filter
was not ignored, just that it contained jibberish and did not match
anything.

I was able to get this to work by setting my browser to use unicode
character encoding and then typing the greek characters directly into
the address bar. Note that when they get url encoded they are not
encoded as "%u03B5" but as "%03%B5"

Hopefully that helps. let us know if you have any luck.

-Justin

Héctor Hugo Pérez Alonso wrote:

Dear all,

I am sending WFS getFeature requests with the browser (Firefox) to
geoserver 1.5.3 using some filters inside. For the usual occidental
characters it works fine, but with greek characters geoserver just skips
the filter parameter in the request and therefore it returns all the
results. I have encoded everything as UTF-8 (up to my knowledge, maybe
there is something else to be encoded): the browser, the request (Tomcat
connector), the character set of geoserver and the database (Postgis).

My request is as follows:

http://localhost:8083/geoserver/wfs?request=GetFeature&service=WFS&version=1.0.0&maxfeatures=20&typename=safe:location&filter=<Filter><And><PropertyIsLike%20wildCard%3D"*"%20singleChar%3D"."%20escape%3D"\"><PropertyName>safe%3Alocation_town_village_settlement_camp</PropertyName><Literal><![CDATA[%u03C1%u03B5%u03C4%u03B9%u03C5%u03B8%u03B8%u03C5]]></Literal></PropertyIsLike></And></Filter>
<http://localhost:8083/geoserver/wfs?request=GetFeature&service=WFS&version=1.0.0&maxfeatures=20&typename=safe:location&filter=<Filter><And><PropertyIsLike%20wildCard%3D"*"%20singleChar%3D"."%20escape%3D"\"><PropertyName>safe%3Alocation_town_village_settlement_camp</PropertyName><Literal><![CDATA[%u03C1%u03B5%u03C4%u03B9%u03C5%u03B8%u03B8%u03C5]]></Literal></PropertyIsLike></And></Filter>&gt;

The Greek characters encoded there are: ρετιυθθυ.

The log show the following messages:

1998242 [FINA] org.vfny.geoserver.servlets.AbstractService - reading
request:
request=GetFeature&service=WFS&version=1.0.0&maxfeatures=20&typename=safe:location&filter=%3CFilter%3E%3CAnd%3E%3CPropertyIsLike%20wildCard%3D%22*%22%20singleChar%3D%22.%22%20escape%3D%22%5C%22%3E%3CPropertyName%3Esafe%3Alocation_town_village_settlement_camp%3C/PropertyName%3E%3CLiteral%3E%3C%21%5BCDATA%5B%u03C1%u03B5%u03C4%u03B9%u03C5%u03B8%u03B8%u03C5%5D%5D%3E%3C/Literal%3E%3C/PropertyIsLike%3E%3C/And%3E%3C/Filter%3E
1998242 [LA M┴S FINA]
org.vfny.geoserver.wfs.requests.readers.GetFeatureKvpReader - setting
global request parameters
1998242 [LA M┴S FINA]
org.vfny.geoserver.wfs.requests.readers.GetFeatureKvpReader - setting
query request parameters
1998242 [LA M┴S FINA]
org.vfny.geoserver.util.requests.readers.KvpRequestReader - adding
simple element safe:location
1998242 [LA M┴S FINA]
org.vfny.geoserver.util.requests.readers.KvpRequestReader - reading
nested: null
1998242 [LA M┴S FINA]
org.vfny.geoserver.util.requests.readers.KvpRequestReader - found
implicit all requested
1998242 [LA M┴S FINA]
org.vfny.geoserver.wfs.requests.readers.GetFeatureKvpReader - setting
query request parameters
1998242 [LA M┴S FINA]
org.vfny.geoserver.wfs.requests.readers.GetFeatureKvpReader - setting
properties: 0
1998242 [LA M┴S FINA]
org.vfny.geoserver.wfs.requests.readers.GetFeatureKvpReader - setting
filters: 0
1998242 [LA M┴S FINA]
org.vfny.geoserver.wfs.requests.readers.GetFeatureKvpReader - query
filter: null
1998242 [M┴S FINA] org.vfny.geoserver.servlets.AbstractService -
serviceRequest provided with HttpServletRequest:
org.apache.coyote.tomcat5.CoyoteRequestFacade@anonymised.com
<mailto:org.apache.coyote.tomcat5.CoyoteRequestFacade@anonymised.com>
1998242 [INFO] org.vfny.geoserver.servlets.AbstractService - handling
request:
Request: null
output format:GML2
max features:20
version:1.0.0
queries:
  Query
   feature type: safe:location
   [properties: ALL ]

Could somebody give me a hint about how to get this working?.

Thanks,

    Héctor.

------------------------------------------------------------------------
Este mensaje, y en su caso, cualquier fichero anexo al mismo, puede
contener informaci髇 clasificada por su emisor como confidencial en el
marco de su Sistema de Gesti髇 de Seguridad de la Informaci髇 siendo
para uso exclusivo del destinatario, quedando prohibida su divulgaci髇
copia o distribuci髇 a terceros sin la autorizaci髇 expresa del
remitente. Si Vd. ha recibido este mensaje err髇eamente, se ruega lo
notifique al remitente y proceda a su borrado. Gracias por su colaboraci髇.
------------------------------------------------------------------------
This message including any attachments may contain confidential
information, according to our Information Security Management System,
and intended solely for a specific individual to whom they are
addressed. Any unauthorised copy, disclosure or distribution of this
message is strictly forbidden. If you have received this transmission in
error, please notify the sender immediately and delete it.

------------------------------------------------------------------------

!DSPAM:4007,471c88cf238891961014482!

------------------------------------------------------------------------

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/

!DSPAM:4007,471c88cf238891961014482!

------------------------------------------------------------------------

_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

!DSPAM:4007,471c88cf238891961014482!

--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org