[OpenLayers-Users] WMS GetFeatureInfo with CQL Filter don't
support Chinese?
Ian Turton
ijturton at gmail.com
Thu Apr 8 10:38:29 EDT 2010
On Thu, Apr 8, 2010 at 7:13 AM, <ahwangyuwei at sina.com> wrote:
> Thak you !
> I am usding GetFeatureInfo to get Feature Info.
> Read a Textfield 's value ,then use it as filter.
> I want to know how to write the params and which params are necessary.
> The exception is Could not parse CQL filter list. Lexical error at line 1,
> column 11. Encountered: "\u2018" (8216), after : "". Parsing : NAME LIKE
> ‘?E2??. Current Token : "NAME" .
>
> Can I use Chinese in CQL_FILTER ?
> How should I set these params and CQL_FILTER?
>
> var params = {
> REQUEST: "GetFeatureInfo",
> EXCEPTIONS: "application/vnd.ogc.se_xml",
> BBOX: map.getExtent().toBBOX(),
> INFO_FORMAT: 'application/vnd.ogc.gml',
> QUERY_LAYERS: map.layers[0].params.LAYERS,
> FEATURE_COUNT: 50,
> Layers: 'CHN',
> Styles: '',
> Srs: 'EPSG:4326',
>
> format: format};
>
> Request=OpenLayers.loadURL("http://159.226.13.203:8080/geoserver/wms?CQL_FILTER=NAME
> LIKE ‘%上海%’", params, this, highlight, setHTMLx);
>
I think that your Chinese characters will need to be escaped in the
URL. There is a possibility that OpenLayers can do that if you add the
CQL_FILTER as a parameter in the code rather than directly to the URL.
As to whether GeoServer can handle them in a CQL filter, I think it
should but others on the GeoServer list will know better.
Ian
--
Ian Turton
More information about the Users
mailing list