We're updating the issue view to help you get more done. 

TurtleWriter does not renders string literals beginning with "\n" as multi-line literals

Description

TurtleWriter wrongly encodes string literals beginning with "\n"

The bug is located on the begging of the method:
org.openrdf.rio.turtle.TurtleWriter.writeLiteral(Literal)

if (label.indexOf('\n') > 0 || label.indexOf('\r') > 0 || label.indexOf('\t') > 0) {

should be

if (label.indexOf('\n') != 1 || label.indexOf('\r') != 1 || label.indexOf('\t') != 1) {

see the UnitTest attached

Environment

None

Status

Assignee

Peter Ansell

Reporter

Jan Dedek

Labels

None

Components

Fix versions

Affects versions

2.7.3
2.6.10

Priority

Minor