W3C home > Mailing lists > Public > public-rdf-dawg@w3.org > January to March 2011

Re: [TTL] Long literals

From: Steve Harris <steve.harris@garlik.com>
Date: Thu, 31 Mar 2011 09:53:13 +0100
Message-Id: <AD6A3F9B-FC07-44E0-AE7D-0E9570EB640F@garlik.com>
Cc: SPARQL Working Group <public-rdf-dawg@w3.org>
To: Andy Seaborne <andy.seaborne@epimorphics.com>
Hm, I don't understand, surely it should be whatever UTF-8 data appears between the """s? If the file has UNIX style line endings you'll get \n, otherwise \r\n, or \r as apprpriate. 

This is especially relevant if you're trying to store e.g. HTTP headers, which are sensitive to the terminating line characters. 

- Steve

Sent on the move.

On 31 Mar 2011, at 09:22, Andy Seaborne <andy.seaborne@epimorphics.com> wrote:

> What is the newline process in long literals?
> 
> """
> abc
> def
> """
> 
> '''
> abc
> def
> '''
> 
> which of CR(\r) NL(\n), CR, NL is it?
> 
> XML behaves as if it's &#xA; i.e. NL (also know as LF).
> 
> As \r escapes apply,
> 
> """\r
> abc\r
> def\r
> """
> 
> would be the CR NL version.
> 
> It's hard to write the NL form if the default is CR NL.
> 
> So NL newlines seems appropriate. It just needs stating though.
> 
> (It can be achieved for a CR NL systems line MS-Windows by simply striping out any raw CR in the input stream anywhere in the input as the NL will achieve the same effect.)
> 
>    Andy
> 
Received on Thursday, 31 March 2011 08:54:09 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 16:15:45 GMT