2

I have a cql filter as SQL. Im trying to parse this cql to OpenLayers.Filter using OpenLayers.Format.CQL.read() 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;
format_cql.read("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 ?

Regards

Antonio Falciano
14.5k2 gold badges39 silver badges68 bronze badges
asked Apr 12, 2012 at 13:52

1 Answer 1

1

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.

answered Apr 17, 2012 at 19:52

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.