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 Jackson
Lead Solution Architect
Blue Slate Solutions | Phone: 518.810.0372 | Cell: 845.392.6923
Email: [email protected] | www.blueslate.net

Reply via email to