1

I am using this query to insert data:

prefix : <http://www.google.com/abc#>

INSERT DATA
{
     
:some&Data a :ABC .
}

But it is failing because of the &. How can I insert the data into Blazegraph db with special characters? The same query like ```

prefix : <http://www.google.com/abc#>

INSERT DATA
{
     
:someData a :ABC .
}
``` passes without errors. I am using python to insert the data, but even in Blazegraph it fails.```

          ERROR: SPARQL-UPDATE: updateStr=prefix : 


INSERT DATA
{
     
:some&Data a :ABC .
}
java.util.concurrent.ExecutionException: org.openrdf.query.MalformedQueryException: Lexical error at line 7, column 7.  Encountered: "D" (68), after : "&"
Ian Kurtis
  • 137
  • 7
  • Have you tried encoding the special characters? E.g. using `u0026` instead of `&`, like this: `` – Valerio Cocchi Oct 18 '21 at 12:40
  • 1
    reserved character escape sequences in local names consist of a \ followed by one of `~.-!$&'()*+,;=/?#@%_` and represent the character to the right of the \, see the IRI reference in the specs: https://www.w3.org/TR/turtle/#sec-iri-references – UninformedUser Oct 18 '21 at 15:25

0 Answers0