[Geoserver-users] GeoServer PropertyIsLike in Unicode search question

Dear All,

I want to search some keyword from GeoServer, like "E11" or "停車場" (Chinese),
My request is below:

EX: Search "E11" :
<wfs:GetFeature service="WFS" version="1.1.0"
outputFormat="JSON"
xmlns:topp="http://www.openplans.org/topp&quot;
xmlns:wfs="http://www.opengis.net/wfs&quot;
xmlns:ogc="http://www.opengis.net/ogc&quot;
xmlns:gml="http://www.opengis.net/gml&quot;
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;
xsi:schemaLocation="http://www.opengis.net/wfs
http://schemas.opengis.net/wfs/1.1.0/wfs.xsd&quot;&gt;
<wfs:Query typeName="osm_lh:planet_osm_polygon">
<ogc:Filter>
<ogc:PropertyIsLike wildCard="*" singleChar="#" escapeChar="!">
<ogc:PropertyName>name</ogc:PropertyName>
<ogc:Literal>*E11*</ogc:Literal>
</ogc:PropertyIsLike>
</ogc:Filter>
</wfs:Query>
</wfs:GetFeature>

Then I found what I want.

When I use Chinese words to search, it always return Nothing !!

EX: Search "停車場" :
<wfs:GetFeature service="WFS" version="1.1.0"
outputFormat="JSON"
xmlns:topp="http://www.openplans.org/topp&quot;
xmlns:wfs="http://www.opengis.net/wfs&quot;
xmlns:ogc="http://www.opengis.net/ogc&quot;
xmlns:gml="http://www.opengis.net/gml&quot;
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;
xsi:schemaLocation="http://www.opengis.net/wfs
http://schemas.opengis.net/wfs/1.1.0/wfs.xsd&quot;&gt;
<wfs:Query typeName="osm_lh:planet_osm_polygon">
<ogc:Filter>
<ogc:PropertyIsLike wildCard="*" singleChar="#" escapeChar="!">
<ogc:PropertyName>name</ogc:PropertyName>
<ogc:Literal>*停車場*</ogc:Literal>
</ogc:PropertyIsLike>
</ogc:Filter>
</wfs:Query>
</wfs:GetFeature>

Return:
{"type":"FeatureCollection","totalFeatures":0,"features":}

I found the GeoServer log message:

Request: getFeature
    service = WFS
    version = 1.1.0
    baseUrl = http://127.0.0.1:8090/geoserver/
    query[0]:
        filter = [ name is like *???* ] <==== HERE
        typeName[0] = {osm_lh}planet_osm_polygon
    outputFormat = JSON
    resultType = results
2014-01-27 13:01:00,232 INFO [wfs.json] - about to encode JSON

So what happen to this ?? Please help !

Thanks !

Tai

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/GeoServer-PropertyIsLike-in-Unicode-search-question-tp5100121.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

This post is the key of this issue.

http://jira.codehaus.org/browse/GEOS-3326

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/GeoServer-PropertyIsLike-in-Unicode-search-question-tp5100121p5100368.html
Sent from the GeoServer - User mailing list archive at Nabble.com.