[redland-dev] [Raptor RDF Syntax Library 0000584]: raptor fails to parse trig files with dos line endings
Mantis Bug Tracker
mantis-bug-sender at librdf.org
Fri Oct 17 11:27:25 EDT 2014
The following issue has been SUBMITTED.
======================================================================
http://bugs.librdf.org/mantis/view.php?id=584
======================================================================
Reported By: james.anderson
Assigned To:
======================================================================
Project: Raptor RDF Syntax Library
Issue ID: 584
Category: utilities
Reproducibility: always
Severity: major
Priority: normal
Status: new
Syntax Name: trig
======================================================================
Date Submitted: 2014-10-17 08:27
Last Modified: 2014-10-17 08:27
======================================================================
Summary: raptor fails to parse trig files with dos line
endings
Description:
a trig document which includes dos end-of-line indicators fails to parse.
imports$ rapper -v
2.0.13
imports$ cat bad.trig
<http://example.org#graph>
{ <http://example.org#this> a <http://example.org#that> . }
imports$ cat ok.trig
<http://example.org#graph> { <http://example.org#this> a
<http://example.org#that> . }
imports$ rapper -c -i trig bad.trig
rapper: Parsing URI file:///root/imports/bad.trig with parser trig
rapper: Error - URI file:///root/imports/bad.trig:2 - syntax error
rapper: Failed to parse file bad.trig trig content
rapper: Parsing returned 0 triples
imports$ rapper -c -i trig ok.trig
rapper: Parsing URI file:///root/imports/ok.trig with parser trig
rapper: Parsing returned 1 triple
root at graphity:~/imports#
the difference is the presence of the use of cr/lf to indicate the end-of-line:
imports$ od -a bad.trig
0000000 < h t t p : / / e x a m p l e .
0000020 o r g # g r a p h > cr nl sp { sp <
0000040 h t t p : / / e x a m p l e . o
0000060 r g # t h i s > sp a sp < h t t p
0000100 : / / e x a m p l e . o r g # t
0000120 h a t > sp . sp } cr nl cr nl
0000134
imports$ od -a ok.trig
0000000 < h t t p : / / e x a m p l e .
0000020 o r g # g r a p h > sp { sp < h t
0000040 t p : / / e x a m p l e . o r g
0000060 # t h i s > sp a sp < h t t p : /
0000100 / e x a m p l e . o r g # t h a
0000120 t > sp . sp } cr nl cr nl
0000132
imports$ tr -d '\015' < bad.trig > ok2.trig
imports$ rapper -c -i trig ok2.trig
rapper: Parsing URI file:///root/imports/ok2.trig with parser trig
rapper: Parsing returned 1 triple
imports$
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2014-10-17 08:27 james.anderson New Issue
======================================================================
More information about the redland-dev
mailing list