Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the RDF-Trine CPAN distribution.

Report information
The Basics
Id: 77747
Status: resolved
Priority: 0/
Queue: RDF-Trine

Owner: Nobody in particular
Requestors: mail [...]

Bug Information
Severity: Important
Broken in: 0.140
Fixed in: (no value)

Subject: Turtle parser - escaping backslashes doesn't seem to work
Download (untitled) / with headers
text/plain 686b
As I read the Turtle spec (any version), the following should be parsed as a single character literal consisting of one backslash: "\\" However, it's currently parsed as a two character string consisting of two backslashes. Ditto the long string form: """\\""" I believe the following should work too, but it currently results in a parse error: '\\' And the following also seems to be permitted by the latest W3C draft, but was not allowed in the drafts of Turtle: '''\\''' The first two cases are covered by the attached test file. This is fairly important as it's blocking RDF-RDB2RDF from passing test R2RMLTC0010c from the R2RML test suite.
text/x-perl 423b
use Test::More tests => 2; use RDF::Trine 0.140; my $model = RDF::Trine::Model->new; RDF::Trine::Parser->new('Turtle')->parse_file_into_model( '', \*DATA, $model, ); $model->as_stream->each(sub { my $st = shift; is( $st->object->literal_value, '\\', $st->subject->uri, ); }); __DATA__ # <test1> <literal> "\\" . <test2> <literal> """\\""" .
If you have RDF::Redland, you may need to suppress it: BEGIN { $ENV{RDFTRINE_NO_REDLAND} = 1; }
fixed in 1.000

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to