I'm new to sparql. I'm trying to retrieve Urdu results from the sparql query and code is working fine in Java forms but when I try to print the result in jsp it shows "ا�? ر_ب�" like this.
String novelname=request.getParameter("Id");
novelname = novelname.replaceAll("\\s","");
OntModel model = ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM_MICRO_RULE_INF);
FileManager.get().readModel( model, "C:/Users/Bisma/Documents/NetBeansProjects/Novelmania/web/novelname.owl" );
String queryStrings ="prefix uni: <http://www.semanticweb.org/novelname.owl#>" +
"select * {uni:"+novelname+" uni:translate ?Novelname. }";
Query query = QueryFactory.create(queryStrings);
QueryExecution qe= QueryExecutionFactory.create(query, model);
org.apache.jena.query.ResultSet resultset = qe.execSelect();
java.io.ByteArrayOutputStream baos= new java.io.ByteArrayOutputStream();
ResultSetFormatter.outputAsCSV(baos, resultset);
String answer= new String(baos.toString().getBytes("ISO8859_1"), "UTF-8");
answer= java.util.Arrays.toString(answer.split("http://www.semanticweb.org/novelname.owl#"));
String[] arrays = answer.split(",");
String nam=arrays[1];
nam=nam.substring(0, nam.length()-1);
nam=nam.replaceAll("\\s","");
out.print(nam);
? �?" something like this