You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Gary Gregory (JIRA)" <ji...@apache.org> on 2016/01/18 22:22:39 UTC

[jira] [Updated] (CSV-168) CsvFormat.nullString should not be escaped

     [ https://issues.apache.org/jira/browse/CSV-168?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gary Gregory updated CSV-168:
-----------------------------
    Description: 
Hello,

Use case: I'm generating MySQL dump files (text format) - for more details check this - http://dev.mysql.com/doc/refman/5.7/en/select-into.html. 

Issue: The value null is represented as "\N". Also by default the escape char is '\N'. The CsvPrinter.printAndEscape method will convert this value into {noformat}"\\N"{noformat}

I suggest to modify the CsvPrinter in order to not escape the nullString value  - it should be written as it is. I can create a pull request if you want.

I consider it a minor issue because it can be mitigated by making sure that the escape character is not a part of the nullString - however in my case it means that the LOAD commands should be modified accordingly.

  was:
Hello,

Use case: I'm generating MySQL dump files (text format) - for more details check this - http://dev.mysql.com/doc/refman/5.7/en/select-into.html. 

Issue: The value null is represented as "\N". Also by default the escape char is '\N'. The CsvPrinter.printAndEscape method will convert this value into {noformat}"\\N".{noformat}

I suggest to modify the CsvPrinter in order to not escape the nullString value  - it should be written as it is. I can create a pull request if you want.

I consider it a minor issue because it can be mitigated by making sure that the escape character is not a part of the nullString - however in my case it means that the LOAD commands should be modified accordingly.


> CsvFormat.nullString should not be escaped
> ------------------------------------------
>
>                 Key: CSV-168
>                 URL: https://issues.apache.org/jira/browse/CSV-168
>             Project: Commons CSV
>          Issue Type: Bug
>          Components: Parser
>    Affects Versions: 1.2
>            Reporter: cornel creanga
>            Priority: Minor
>
> Hello,
> Use case: I'm generating MySQL dump files (text format) - for more details check this - http://dev.mysql.com/doc/refman/5.7/en/select-into.html. 
> Issue: The value null is represented as "\N". Also by default the escape char is '\N'. The CsvPrinter.printAndEscape method will convert this value into {noformat}"\\N"{noformat}
> I suggest to modify the CsvPrinter in order to not escape the nullString value  - it should be written as it is. I can create a pull request if you want.
> I consider it a minor issue because it can be mitigated by making sure that the escape character is not a part of the nullString - however in my case it means that the LOAD commands should be modified accordingly.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)