0

I am using dotnetrdf with asp.net ,and trying to get altLabels for authors names via sparql my query is like this:

SparqlRemoteEndpoint endpoint = new SparqlRemoteEndpoint(new Uri("http://dbpedia.org/sparql"), "http://dbpedia.org");
SparqlParameterizedString AuthorQueryString = new SparqlParameterizedString();
AuthorQueryString.Namespaces.AddNamespace("rdfs", new Uri("http://www.w3.org/2000/01/rdf-schema#"));
AuthorQueryString.Namespaces.AddNamespace("owl", new Uri("http://www.w3.org/2002/07/owl#"));
           
AuthorQueryString.CommandText = "Select * {?s rdfs:label ?o."+ 
                                 "optional{?s owl:sameAs ?w. FILTER(contains(str(?w),\"wikidata\")).}"+
                                                "FILTER(contains(str(?o),'jack')).}"+
                                                    "LIMIT 1 ";

and it works fine but when I am replacing the name 'jack' with arabic stings like'محمود' , I get WebException: The remote server returned an error: (406) Not Acceptable. I've tried myHttpWebRequest.Headers.Add("Accept-Language:ar"); but didn't succeed . the query works fine on the SPARQL query Editor and returns

s o w http://dbpedia.org/resource/Mahmoud_Darwish "محمود درويش"@ar http://www.wikidata.org/entity/Q207720

0 Answers0