Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a cql filter as SQL. Im trying to parse this cql to OpenLayers.Filter using method. It all works fine since my input is ascii. When I type Turkish characters as VALUE an error occurs. I modifed regex belong to VALUE property in CQL.js as /(^('.+'|\d+(.\d*)?|.\d+))/ Now it accepts non-ascii characters but generated Filter is wrong. The regex i modified might affect somewhere.

What i try and what message i get actually like follow

var format_cql = new OpenLayers.Format.CQL;"NAME = 'ŞAKİR'");

Error: ERROR: In parsing: ['ŞAKİR'], expected one of: VALUE: /^('\w+'|\d+(.\d*)?|.\d+)/

If i type SAKIR instead of ŞAKİR it returns a OpenLayers Comparison object well. It also doesnt allow to type space character in value.

Could someone please help me ?


share|improve this question

My friend helped me and changed regex of 'value' property in CQL.js as /^('([^ \t-~]|\w|\s)'|\d+(.\d)?|.\d+)/i It works well with unicode characters and spaces. Fyi.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.