[ 
https://issues.apache.org/jira/browse/SANDBOX-210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12625726#action_12625726
 ] 

Ilya Egoshin commented on SANDBOX-210:
--------------------------------------

Hi pcsri1956,

Are you sure it's the best way, or maybe this will be better:

// change sb.append('\\')  to sb.append('"')
private String escapeAndQuote(String value) {
.........    
          if (c == strategy.getEncapsulator()) {

             sb.append(c).append(c);                    
            
           // changed from sb.append('\\').append(c); [ Change only the above 
line]
 
             continue;
................
      }
      }

so no matter what is encapsulator " or something else it will always double it.

> Commons CSV EXCELL_STRATEGY is reading CSV files with double quote and comma 
> properly but not writing them back the same way
> ----------------------------------------------------------------------------------------------------------------------------
>
>                 Key: SANDBOX-210
>                 URL: https://issues.apache.org/jira/browse/SANDBOX-210
>             Project: Commons Sandbox
>          Issue Type: Bug
>          Components: CSV
>            Reporter: Ilya Egoshin
>         Attachments: CSVPrinter.java
>
>
> original line: My line is containing ", symbols
> line in CSV file after "Save as CSV" in Excell: "My line containing "", 
> symbols"
> line is CSV file as output from CSVPrinter with EXCELL_STRATEGY: "My line 
> containing \", symbols"
> as a result when you will try to open that file in the excell you see text 
> inside two cells:
> 1 cell: My line containing \
> 2 cell: symbols
> is it again Microsoft "features", that are "improving" RFC?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to