You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by Mikael Pesonen <mi...@lingsoft.fi> on 2021/06/02 13:28:06 UTC

Escaped control characters in strings with Fuseki

Hi,

when posting turtle data with newlines, for example

lsr:82b9a3b5-6cba-4bd3-95c3-d309e8362c5e
         dcterms:title
                 """2380
Bellow Control Valve"""@en .

it's returned for construct query in escaped form

lsr:82b9a3b5-6cba-4bd3-95c3-d309e8362c5e
        dcterms:title
                 "2380\r\nBellow Control Valve"@en

Is it possible to get strings back in unescaped form? If not, is there a 
list of escaped characters available?

Re: Escaped control characters in strings with Fuseki

Posted by Andy Seaborne <an...@apache.org>.

On 02/06/2021 14:28, Mikael Pesonen wrote:
> 
> Hi,
> 
> when posting turtle data with newlines, for example
> 
> lsr:82b9a3b5-6cba-4bd3-95c3-d309e8362c5e
>          dcterms:title
>                  """2380
> Bellow Control Valve"""@en .
> 
> it's returned for construct query in escaped form
> 
> lsr:82b9a3b5-6cba-4bd3-95c3-d309e8362c5e
>         dcterms:title
>                  "2380\r\nBellow Control Valve"@en
> 
> Is it possible to get strings back in unescaped form? 

Not change the output - because this form preserves "\r\n" vs "\n" 
newline style - i.e. it is safer.

Parse the result. The escapes will be processed.

> If not, is there a 
> list of escaped characters available?

See the Turtle spec.

     Andy