BUG: parsing error (\U... in a long string) in SPARQL update

4 views
Skip to first unread message

Doug Burke

unread,
Jan 10, 2015, 6:58:37 PM1/10/15
to sta...@clarkparsia.com

I think the following is syntactically valid (it's a much-shorter version of my original problem case), but Stardog version 2.2.4 errors out:

% cat update-fail
insert data {
<urn:alpha> <urn:beta> """\U0001F61F""" .
}

% curl -i -u admin:admin --data-urlencode update@update-fail  http://localhost:5820/single/update
HTTP/1.1 400 Lexical error at line 2, column 28.  Encountered: "U" (85), after : "\"\\"
Content-Length: 74
SD-Error-Code: MalformedQuery
Connection: close
Server: Stardog/2.2.4/v4

Lexical error at line 2, column 28.  Encountered: "U" (85), after : "\"\\"

Thanks,
Doug

Mike Grove

unread,
Jan 12, 2015, 8:35:23 AM1/12/15
to stardog
On Sat, Jan 10, 2015 at 6:58 PM, Doug Burke <dbur...@gmail.com> wrote:

I think the following is syntactically valid (it's a much-shorter version of my original problem case), but Stardog version 2.2.4 errors out:

% cat update-fail
insert data {
<urn:alpha> <urn:beta> """\U0001F61F""" .
}

This seems like a bug in the Sesame SPARQL parser.  There is no clear example in the example for these longer unicode escape sequences, but this looks like it's right.  However, ARQ also fails to parse this query, and it seems unlikely that both parsers would have the same bug, so perhaps there's something subtle wrong with the query.

I created an issue [1] for this in the Sesame issue tracker in the meantime.

Cheers,

Mike

 

% curl -i -u admin:admin --data-urlencode update@update-fail  http://localhost:5820/single/update
HTTP/1.1 400 Lexical error at line 2, column 28.  Encountered: "U" (85), after : "\"\\"
Content-Length: 74
SD-Error-Code: MalformedQuery
Connection: close
Server: Stardog/2.2.4/v4

Lexical error at line 2, column 28.  Encountered: "U" (85), after : "\"\\"

Thanks,
Doug

--
-- --
You received this message because you are subscribed to the C&P "Stardog" group.
To post to this group, send email to sta...@clarkparsia.com
To unsubscribe from this group, send email to
stardog+u...@clarkparsia.com
For more options, visit this group at
http://groups.google.com/a/clarkparsia.com/group/stardog?hl=en

Reply all
Reply to author
Forward
0 new messages