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";  
xmlns:wfs="http://www.opengis.net/wfs";  
xmlns:ogc="http://www.opengis.net/ogc";  
xmlns:gml="http://www.opengis.net/gml";  
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";  
xsi:schemaLocation="http://www.opengis.net/wfs
http://schemas.opengis.net/wfs/1.1.0/wfs.xsd";>
<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";  
xmlns:wfs="http://www.opengis.net/wfs";  
xmlns:ogc="http://www.opengis.net/ogc";  
xmlns:gml="http://www.opengis.net/gml";  
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";  
xsi:schemaLocation="http://www.opengis.net/wfs
http://schemas.opengis.net/wfs/1.1.0/wfs.xsd";>
<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.

------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to