Skip to content

Support IRIs but what about double quotes? #41

@idimopoulos

Description

@idimopoulos

I am opening an issue because because I would like to first have a small feedback if I am thinking this correctly to not lose too much time here. This is kind of a follow up from #29 where we improved the support for literals and we cleared out a lot about what characters are supported and what are not.

Recently, I had the same issue but for the subject. From what I can read online, the RDF data, support IRIs (Internaltional RIs). That means that IRIs like http://example.com/person#name="Ηλίας" is perfectly valid as a resource identifier.

2 issues here:

  1. We did not update in Successor of #25: Boost Ntriples performance by @idimopoulos #29 the subjects, we only handled objects. That means that all characters are currently encoded, and the URL above is converted completely using the old system (characters are replaced by their \0x#### version or their \u#### version.
  2. The second problem, is the double quotes. While it should be perfectly fine, there is a problem when running queries and how they are transported if there is a way. For example, in Virtuoso (community edition 7.2) the queries
WITH <http://my-example-graph>
INSERT { <http://example.com/person#"Ηλίας"> <http://example.com/predicates#hasName> "Ilias" } 
WITH <http://my-example-graph>
INSERT { <http://example.com/person#\"Ηλίας\"> <http://example.com/predicates#hasName> "Ilias" } 
WITH <http://my-example-graph>
INSERT { <http://example.com/person#\u0022Ηλίας\u0022> <http://example.com/predicates#hasName> "Ilias" } 
WITH <http://my-example-graph>
INSERT { <http://example.com/person#%22Ηλίας%22> <http://example.com/predicates#hasName> "Ilias" } 

either throw an error, or the last one works, but the %22 is not decoded, is passed as is. However, if I am to do this:

WITH <http://my-example-graph>
INSERT { ?identifier <http://example.com/predicates#hasName> "Ilias" }
WHERE { SELECT ?identifier WHERE {
  BIND ( IRI("http://example.com/person#\"Ηλίας\"") as ?identifier )
}}

I am able to insert the quotes in the database as a normal IRI. Do you have @k00ni any experience with this? Does @zozlak has any experience on how this should be handled?

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions