On Mon, 2009-08-31 at 21:05 +0100, Hugh Williams wrote:
> How is the data inserted into Virtuoso is this done via the same Jena
> application or loaded by some other means ?
Huhg, here you have a piece of code:
File d = new
File(this.getClass().getClassLoader().getResource("full.rdf").getPath()); //
the file is correctly UTF-8 encoded
FileInputStream fis= new FileInputStream(d);
byte[] b = new byte[fis.available()];
fis.read(b);
fis.close ();
String rdf = new String (b);
System.out.println(rdf); // Text printed correctly encoded, also
parsing it with a Jena Model
VirtModel virtModel =
VirtModel.createDefaultModel("jdbc:virtuoso://localhost:1111/charset=UTF-8",
"dba", "dba");
virtModel.read(new StringReader(rdf), null);
Now if we execute an sparql query: select * where {?s ?p ?o} we see the
encoding problem: "AVIL?S" instead of "AVILÉS".
<http://example.org/city/ES/ASTURIAS/AVIL%C3%89S>
<http://purl.org/dc/elements/1.1/title> "AVIL?S"
Do you see anything wrong?
Thanks in advance.
Best,
--
Sergio Fernández - [email protected]
R&D Deparment
CTIC Foundation - www.fundacionctic.org
Phone: +34 984 29 12 12
Fax: +34 984 39 06 12
Edificio Centros Tecnológicos
Parque Científico Tecnológico
33203 Cabueñes - Gijón - Asturias - Spain