On 27/03/13 20:14, Aaron Jackson wrote:
Hi,
I have a Jena Model instance that contains triples where the data contains
newline characters, as well as other chars that typically require escaping
(tab, ", \, etc.).
I have no trouble inserting this data because I escape all inbound invalid
characters before they are pushed (through a SPARQL insert) to the triple
store. When it is read back out, the data is perfectly fine strings.
The problem is when I write the model as a turtle file (with the write()
method) the result cannot be read back in, because the file has raw
newlines and other invalid characters in it.
Is there a way to force the write to escape certain characters, or will I
need to manually loop through all the statements and escape these
occurrences individually?
It seems like any file generated by a call to write() should be readable by
a call to read().
Thanks,
Aaron
Aaron,
It should work. Which version are you using?
Do you have complete, minimal example to debug?
Andy