openlink / virtuoso-opensource

Virtuoso is a high-performance and scalable Multi-Model RDBMS, Data Integration Middleware, Linked Data Deployment, and HTTP Application Server Platform
https://vos.openlinksw.com
Other
867 stars 210 forks source link

Incorrect handling of UTF8 characters on SPARQL HTTP endpoint #1026

Closed Tomas2D closed 2 years ago

Tomas2D commented 2 years ago

Running following query on latest Virtuoso HTTP SPARQL endpoint, no triples are returned, however running following query via JDBC driver the expected triples are returned.

SELECT *
WHERE {
   SERVICE <https://ruian.linked.opendata.cz/sparql> {
    <https://ruian.linked.opendata.cz/zdroj/stavební-objekty/21868701> <https://ruian.linked.opendata.cz/slovník/početBytů> ?flatCount .
   }
}
HughWilliams commented 2 years ago

Is this a query that was working with a previous VOS build, as I have the same problem with the current stable/7 build?

And can recreate against our one of our public endpoints (URIBurner.com), whereas it returns results when queried via the "isql" command line tool, i.e., SQL/JDBC, etc.

SQL> SPARQL SELECT * WHERE {    SERVICE <https://ruian.linked.opendata.cz/sparql> {     <https://ruian.linked.opendata.cz/zdroj/stavební-objekty/21868701> <https://ruian.linked.opendata.cz/slovník/početBytů> ?flatCount .    } };
flatCount
LONG VARCHAR
_______________________________________________________________________________

107

1 Rows. -- 172 msec.
SQL>

I suspect it is the wide chars in the IRIs that are not being coded correctly when being passed by the SPARQL endpoint or SPARQL-FED service, as if I run a query of the same type with no wide chars then it returns results.

We shall look into this ...

Tomas2D commented 2 years ago

I did not try this query with the build on stable branch, so I cant tell.

pkleef commented 2 years ago

This has been fixed in develop/7 commit id c67527f12746b1c9b6c61b83a85ef0adce364600