Dashes in literals are not allowed?


  • UnicodeEncodeError: 'latin-1' codec can't encode character '\u2013' in position 1151: Body ('–') is not valid Latin-1. Use body.encode('utf-8') if you want to send it encoded in UTF-8.


ao:ProductQuantity 'text – more text; and more text' ;

Note: - there is a semicolon there too.


We need more context to understand what is going on here. What were you doing when you encountered this error? Were you running a stardog or stardog-admin command? If so, can you please share the full command text? Or were you executing a query or adding data (or a VG) in Stardog Studio? Additionally, please include any error present in the stardog.log file on the server.


Plain old insert data via rest api:

        c:CW1073844 rdf:type ao:S1 ;
        rdfs:label "some label" ;
       ao:ProductQuantity 'text – more text; and more text' .

Can you include the error in stardog.log?

The above is really not a dash - but some other kind of char that looks like a dash - a longer one?

I believe that's an em-dash. There seems to be some sort of character encoding issue but I'm a little confused by the error message.

It is not a dash. Otherwise, you would not see this error. You should set the Content-Encoding header in your request.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.