You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by "Andy Seaborne (JIRA)" <ji...@apache.org> on 2014/05/17 14:30:16 UTC

[jira] [Comment Edited] (JENA-696) SPARQL CSV Parser does not handled escaped quotes

    [ https://issues.apache.org/jira/browse/JENA-696?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14000773#comment-14000773 ] 

Andy Seaborne edited comment on JENA-696 at 5/17/14 12:28 PM:
--------------------------------------------------------------

Possible solution. CSV parser + rewritten CSVInput.

Includes a basic CSV parser until we adopt one particular one.  SPARQL CSV Results tend to be compliant with the RFC so the parser, for this purpose, should be functionally OK.  It is UTF-8.


was (Author: andy.seaborne):
Possible solution. CSV parser + rewritten CSVInput.

Includes a basic CSV parser until we adopt one particular one.  SPARQL CSV Results tend to be compliant with the RFC so the, parser for this purpose, should be functionally OK.  It is UTF-8.

> SPARQL CSV Parser does not handled escaped quotes
> -------------------------------------------------
>
>                 Key: JENA-696
>                 URL: https://issues.apache.org/jira/browse/JENA-696
>             Project: Apache Jena
>          Issue Type: Bug
>            Reporter: Andy Seaborne
>            Priority: Minor
>         Attachments: CSVParser.java, JENA-696-v1.patch, TestCSVParser.java
>
>
> If we are going to commit to a CSV back to results set attempt then it'll need to handle "" inside "..."
> Example:
> {noformat}
>             String x = "x\n\"123\"\"456\"" ;
>             byte[] b = StrUtils.asUTF8bytes(x) ;
>             ResultSet rs = CSVInput.fromCSV(new ByteArrayInputStream(b)) ;
>             ResultSetFormatter.out(rs); 
> {noformat}
> gives
> {noformat}
> Error Parsing CSV results at Line 2 - Expected comma after quote
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.2#6252)