We're updating the issue view to help you get more done. 

Federalized queries using the SERVICE keyword fail due to low level http encoding issues.

Description

The problem is that a federated query where the text in the SERVICE pattern contained japanese text would not give a result. While the same pattern with the japanese text replaced by english text worked. Suggesting an encoding issue when sending the data to the external sparql endpoint. I got this to work by adding a line of code in the following sesame class. org.openrdf.repository.sparql.query.SPARQLQuery Just after the new PostMethod is instantiated one needs to set the following content parameters HttpMethodParams.HTTP_CONTENT_CHARSET, "utf-8" HttpMethodParams.HTTP_URI_CHARSET, "utf-8" Like this.

1 protected HttpMethodBase getResponse() throws HttpException, IOException, QueryEvaluationException { PostMethod post = new PostMethod(url); // We need to encode our data in utf-8 as that allows interantionalized // queries. post.getParams().setParameter(HttpMethodParams.HTTP_CONTENT_CHARSET, "utf-8"); post.getParams().setParameter(HttpMethodParams.HTTP_URI_CHARSET, "utf-8");

This issue of not properly encoding both the content and the uri might be more widespread.

Environment

None

Status

Assignee

JeenB

Reporter

Jerven Bolleman

Labels

None

Fix versions

Affects versions

2.6.5

Priority

Major