CQL parser fails with escaped quote
-----------------------------------

                 Key: GEOT-1586
                 URL: http://jira.codehaus.org/browse/GEOT-1586
             Project: GeoTools
          Issue Type: Bug
          Components: core cql
    Affects Versions: 2.4-RC0
         Environment: JDK 1.6.0_02, Windows XP Pro
            Reporter: John Fletcher


For the following input filter string:

MAJOR_WATERSHED_SYSTEM = 'Pend-d''Oreille River'

CQL.toFilter(input) throws the following exception:

org.geotools.filter.text.cql2.ParseException: Encountered "Oreille River" at 
line 1, column 34.
Was expecting one of:
    <EOF> 
    <AND> ...
    "or" ...
    "/" ...
    "*" ...
    "+" ...
    "-" ...
    
        at 
org.geotools.filter.text.cql2.CQLParser.generateParseException(CQLParser.java:4129)
        at 
org.geotools.filter.text.cql2.CQLParser.jj_consume_token(CQLParser.java:4006)
        at 
org.geotools.filter.text.cql2.CQLParser.CompilationUnit(CQLParser.java:72)
        at org.geotools.filter.text.cql2.CQL.toFilter(CQL.java:136)

I believe the catalogue services spec lists two single quotes as the way to 
escape a single quote inside a character literal (cropped from the BNF in the 
spec document):
<quote> ::= '
<character string literal> ::=
<quote> [ {<character representation>} ] <quote>
<character representation> ::= <nonquote character> | <quote symbol>
<quote symbol> ::= <quote><quote>

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to