[
https://issues.apache.org/jira/browse/CSV-208?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16307804#comment-16307804
]
Thomas Richter commented on CSV-208:
------------------------------------
The test [^CSVFormatTest.java] causes
{{java.io.IOException: (startline 1) EOF reached before encapsulated token
finished
at org.apache.commons.csv.Lexer.parseEncapsulatedToken(Lexer.java:288)
at org.apache.commons.csv.Lexer.nextToken(Lexer.java:158)
at org.apache.commons.csv.CSVParser.nextRecord(CSVParser.java:586)
at org.apache.commons.csv.CSVParser.getRecords(CSVParser.java:448)
}}
> Cannot parse PostgreSQL CSV and Text formats
> --------------------------------------------
>
> Key: CSV-208
> URL: https://issues.apache.org/jira/browse/CSV-208
> Project: Commons CSV
> Issue Type: Bug
> Components: Parser
> Reporter: Gary Gregory
> Attachments: CSVFormatTest.java
>
>
> Cannot parse PostgreSQL CSV and Text formats.
> We cannot seem to parse the stock PostgreSQL Text format, see
> - org.apache.commons.csv.CSVPrinterTest.testRandomPostgreSqlCsv()
> - org.apache.commons.csv.CSVPrinterTest.testRandomPostgreSqlText()
> - org.apache.commons.csv.CSVPrinterTest.testPostgreSqlCsvNullOutput()
> - org.apache.commons.csv.CSVPrinterTest.testPostgreSqlCsvTextOutput()
> I am guessing that the issue is that in PostgreSQL, the escape character is
> the same as the quote character:
> {quote}
> QUOTE
> Specifies the quoting character to be used when a data value is quoted. The
> default is double-quote. This must be a single one-byte character. This
> option is allowed only when using CSV format.
> ESCAPE
> Specifies the character that should appear before a data character that
> matches the QUOTE value. The default is the same as the QUOTE value (so that
> the quoting character is doubled if it appears in the data). This must be a
> single one-byte character. This option is allowed only when using CSV format.
> {quote}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)