On 04/01/17 14:23, claire Qiu wrote:
Hi,
I have got a data file which is in N-Triples form, and while I was loading
the data to TDB,syntactic error occurred. Then, it showed me that some of
the URIs contains illegal symbols. Below are two of them, and illegal
symbols are "{" and "|".
a. <
http://www.pearson-studium.de/main/main.asp?page=bookdetails&ProductID=54944&SID=
*{*316207EB-0C0E-40F8-92EB-EFB6BC741EB1*}*&TOKEN={5C474860-AE81-4130-A442-163777B7FFF4}>
.
b. <http://www.ems-ph.org/books/book.php?proj_nr=78&srch=searchterm*|*
farber>
My question is : can I modify the code somehow so that the URIs can be
parsed successfully?
You need to fix the data which has illegal URIs in it.
One way is to %-encode characters - note this does not escape the
character, it puts %-X-X into the URI.
Many formats require legal URIs - if you put bad ones in it is only a
matter of time before that causes you problems (can't query them, can't
serialize the data, can't read it into another system etc etc).
Andy
Thank you very much!
Best Regards,
Haonan, QIu