Reputation: 723
I have a problem with the DBpedia SPARQL endpoint. When I call this query it doesn't return any results:
SELECT DISTINCT * WHERE {
<http://dbpedia.org/resource/Santiago_Bernabéu_Stadium> rdfs:label ?label .
OPTIONAL {
<http://dbpedia.org/resource/Santiago_Bernabéu_Stadium> geo:lat ?lat ;
geo:long ?long .
}
}
But when I change the URL to something like <http://dbpedia.org/resource/Sierra_Nevada_(Spain)>
it works perfectly. I call it from Java using Apache Commons HttpClient (tried with POST and GET).
I think the problem is in é
with accent, but I can´t find any encoding solving my problem. Do you know how could I fix it?
Upvotes: 2
Views: 575
Reputation: 1
I have solved this problem updating the jena library. Search and and use the last version of all jar files. For example, I was using jena-2.6.3 and now I am using jena-arq-2.9.3.jar, jena-core-2.7.3-test.jar, jena-2.7.3.jar, jena-iri-0.9.3.jar, etc.
Upvotes: 0
Reputation: 723
It looks I found the answer. Using URLEncoder was not solution as long it was changing other characters (like braces). But I've found that I should use URIref class from Jena. Problem solved!
Upvotes: 1