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

Assignee

Peter Ansell

Reporter

Jan Dědek

Labels

None

Time tracking

1h

Components

Fix versions

Affects versions

Priority

Minor
Configure