You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Ilya Egoshin (JIRA)" <ji...@apache.org> on 2008/02/12 18:27:08 UTC

[jira] Created: (SANDBOX-210) Commons CSV EXCELL_STRATEGY is reading CSV files with double quote and comma properly but not writing them back the same way

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


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.


[jira] Updated: (SANDBOX-210) Commons CSV EXCELL_STRATEGY is reading CSV files with double quote and comma properly but not writing them back the same way

Posted by "Ram (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SANDBOX-210?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ram updated SANDBOX-210:
------------------------

    Attachment:     (was: CSVPrinter.java)

> 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
>
> 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.


[jira] Commented: (SANDBOX-210) Commons CSV EXCELL_STRATEGY is reading CSV files with double quote and comma properly but not writing them back the same way

Posted by "Ram (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SANDBOX-210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12625735#action_12625735 ] 

Ram commented on SANDBOX-210:
-----------------------------

Hi Ilya,

You solution is ok. I want to commit this change to csv. Can somebody update this change.

Thanks,
Ram 

> 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.


[jira] Issue Comment Edited: (SANDBOX-210) Commons CSV EXCELL_STRATEGY is reading CSV files with double quote and comma properly but not writing them back the same way

Posted by "Ram (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SANDBOX-210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12625607#action_12625607 ] 

pcsri1956 edited comment on SANDBOX-210 at 8/25/08 7:49 PM:
------------------------------------------------------

This issue happens in CSVPrinter class. Here is how I fixed it. Look in the comment below where change is suggested specifically EXCEL_STRATEGY

private String escapeAndQuote(String value) {
.........    
          if (c == strategy.getEncapsulator()) {

        sb.append('"').append(c);                      // changed from  sb.append('\\').append(c);  
        
        continue;
................
      }
      }

      was (Author: pcsri1956):
    This issue happens in CSVPrinter class. Here is how I fixed it. Look in the comment below where change is suggested specifically EXCEL_STRATEGY

private String escapeAndQuote(String value) {
.........    
          if (c == strategy.getEncapsulator()) {
        sb.append('"').append(c);                      // changed from  sb.append('\\').append(c);  
        continue;
................
      }
      }
  
> 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
>
> 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.


[jira] Updated: (SANDBOX-210) Commons CSV EXCELL_STRATEGY is reading CSV files with double quote and comma properly but not writing them back the same way

Posted by "Ram (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SANDBOX-210?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ram updated SANDBOX-210:
------------------------

    Attachment:     (was: CSVPrinter.java)

> 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-excelstratergy.patch, 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.


[jira] Resolved: (SANDBOX-210) Commons CSV EXCELL_STRATEGY is reading CSV files with double quote and comma properly but not writing them back the same way

Posted by "Yonik Seeley (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SANDBOX-210?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Yonik Seeley resolved SANDBOX-210.
----------------------------------

    Resolution: Fixed

This should be fixed by SANDBOX-322.

> 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
>             Fix For: CSV 1.0
>
>         Attachments: CSVPrinter.java, CSVPrinter.java-patch, CSVPrinterTest.patch
>
>
> 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.


[jira] Updated: (SANDBOX-210) Commons CSV EXCELL_STRATEGY is reading CSV files with double quote and comma properly but not writing them back the same way

Posted by "Ram (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SANDBOX-210?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ram updated SANDBOX-210:
------------------------

    Attachment: CSVPrinterTest.patch

Junit test included as requested

patch file for commons-csv\src\test\org\apache\commons\csv/CSVPrinterTest.java


> 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, CSVPrinter.java-patch, CSVPrinterTest.patch
>
>
> 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.


[jira] Commented: (SANDBOX-210) Commons CSV EXCELL_STRATEGY is reading CSV files with double quote and comma properly but not writing them back the same way

Posted by "Henri Yandell (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SANDBOX-210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12625987#action_12625987 ] 

Henri Yandell commented on SANDBOX-210:
---------------------------------------

General concept of this change I'm in favour of. Not sure about the change though - strategy.getEscape seems like the replacement for \\, not getEncapsulator (bit rusty on the code). The \\ escaping is effectively removed - it should be replaced by something rather than removed I think. 

Tests would be much appreciated too.

> 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, CSVPrinter.java-patch
>
>
> 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.


[jira] Updated: (SANDBOX-210) Commons CSV EXCELL_STRATEGY is reading CSV files with double quote and comma properly but not writing them back the same way

Posted by "Ram (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SANDBOX-210?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ram updated SANDBOX-210:
------------------------

    Attachment: csvprinter-excelstratergy.patch

Patch file for this change. 

> 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-excelstratergy.patch, 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.


[jira] Commented: (SANDBOX-210) Commons CSV EXCELL_STRATEGY is reading CSV files with double quote and comma properly but not writing them back the same way

Posted by "Matt Benson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SANDBOX-210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12626138#action_12626138 ] 

Matt Benson commented on SANDBOX-210:
-------------------------------------

While we're talking about things that would be appreciated, it might be nice if further changes were done more atomically than yesterday's comment, edit, edit, comment, edit, attach, remove, attach, attach, comment, edit, etc., etc.... I realize changes are necessary sometimes, but that seemed a bit extreme.

> 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, CSVPrinter.java-patch
>
>
> 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.


[jira] Issue Comment Edited: (SANDBOX-210) Commons CSV EXCELL_STRATEGY is reading CSV files with double quote and comma properly but not writing them back the same way

Posted by "Ram (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SANDBOX-210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12625607#action_12625607 ] 

pcsri1956 edited comment on SANDBOX-210 at 8/25/08 7:56 PM:
------------------------------------------------------

This issue happens in CSVPrinter class. Here is how I fixed it. Look in the comment below where change is suggested specifically for EXCEL_STRATEGY

In CSVPrinter class ..
private String escapeAndQuote(String value) {
.........    
          if (c == strategy.getEncapsulator()) {

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
                             sb.append('"').append(c);                    

                      // COMMENT ------------> changed from {color:red}  sb.append('\\').append(c);  {color}
 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 
        continue;
................
      }
      }

      was (Author: pcsri1956):
    This issue happens in CSVPrinter class. Here is how I fixed it. Look in the comment below where change is suggested specifically for EXCEL_STRATEGY

In CSVPrinter class ..
private String escapeAndQuote(String value) {
.........    
          if (c == strategy.getEncapsulator()) {

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
                             sb.append('"').append(c);                    

                      // COMMENT ------------> changed from  sb.append('\\').append(c);  
 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 
        continue;
................
      }
      }
  
> 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
>
> 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.


[jira] Issue Comment Edited: (SANDBOX-210) Commons CSV EXCELL_STRATEGY is reading CSV files with double quote and comma properly but not writing them back the same way

Posted by "Ram (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SANDBOX-210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12625607#action_12625607 ] 

pcsri1956 edited comment on SANDBOX-210 at 8/25/08 7:50 PM:
------------------------------------------------------

This issue happens in CSVPrinter class. Here is how I fixed it. Look in the comment below where change is suggested specifically EXCEL_STRATEGY

private String escapeAndQuote(String value) {
.........    
          if (c == strategy.getEncapsulator()) {

                             sb.append('"').append(c);                      // changed from  sb.append('\\').append(c);  
        
        continue;
................
      }
      }

      was (Author: pcsri1956):
    This issue happens in CSVPrinter class. Here is how I fixed it. Look in the comment below where change is suggested specifically EXCEL_STRATEGY

private String escapeAndQuote(String value) {
.........    
          if (c == strategy.getEncapsulator()) {

        sb.append('"').append(c);                      // changed from  sb.append('\\').append(c);  
        
        continue;
................
      }
      }
  
> 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
>
> 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.


[jira] Issue Comment Edited: (SANDBOX-210) Commons CSV EXCELL_STRATEGY is reading CSV files with double quote and comma properly but not writing them back the same way

Posted by "Ram (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SANDBOX-210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12625607#action_12625607 ] 

pcsri1956 edited comment on SANDBOX-210 at 8/25/08 8:01 PM:
------------------------------------------------------

This issue happens in CSVPrinter class. Here is how I fixed it. Look in the comment below where change is suggested specifically for EXCEL_STRATEGY

{code:title=Bar.java|borderStyle=solid}
// change sb.append('\\')  to sb.append('"')
private String escapeAndQuote(String value) {
.........    
          if (c == strategy.getEncapsulator()) {

\\
                             sb.append('"').append(c);                    
\\
            // changed from {color:red}  sb.append('\\').append(c);  {color}
 \\ 
        continue;
................
      }
      }

{code} 

      was (Author: pcsri1956):
    This issue happens in CSVPrinter class. Here is how I fixed it. Look in the comment below where change is suggested specifically for EXCEL_STRATEGY

In CSVPrinter class ..
private String escapeAndQuote(String value) {
.........    
          if (c == strategy.getEncapsulator()) {

\\
                             sb.append('"').append(c);                    
\\
                      // COMMENT ------------> changed from {color:red}  sb.append('\\').append(c);  {color}
 \\ 
        continue;
................
      }
      }
  
> 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
>
> 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.


[jira] Commented: (SANDBOX-210) Commons CSV EXCELL_STRATEGY is reading CSV files with double quote and comma properly but not writing them back the same way

Posted by "Ram (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SANDBOX-210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12625607#action_12625607 ] 

Ram commented on SANDBOX-210:
-----------------------------

This issue happens in CSVPrinter class. Here is how I fixed it. Look in the comment below where change is suggested specifically EXCEL_STRATEGY

private String escapeAndQuote(String value) {
.........    
    StringBuffer sb = new StringBuffer(value.length() + count);
    sb.append(strategy.getEncapsulator());
    for (int i = 0; i < value.length(); i++) {
      char c = value.charAt(i);

      if (c == strategy.getEncapsulator()) {
        sb.append('"').append(c);                      // changed from  sb.append('\\').append(c);  
        continue;
      }
      switch (c) {
        case '\n' :
          sb.append("\\n");
          break;
        case '\r' :
          sb.append("\\r");
          break;
        case '\\' :
          sb.append("\\\\");
          break;
        default :
          sb.append(c);
      }
    }
    sb.append(strategy.getEncapsulator());
    return sb.toString();
  }

}

> 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
>
> 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.


[jira] Commented: (SANDBOX-210) Commons CSV EXCELL_STRATEGY is reading CSV files with double quote and comma properly but not writing them back the same way

Posted by "Ram (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SANDBOX-210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12626167#action_12626167 ] 

Ram commented on SANDBOX-210:
-----------------------------

I agree matt. I am new to using this tool. :)

> 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, CSVPrinter.java-patch
>
>
> 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.


[jira] Updated: (SANDBOX-210) Commons CSV EXCELL_STRATEGY is reading CSV files with double quote and comma properly but not writing them back the same way

Posted by "Ram (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SANDBOX-210?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ram updated SANDBOX-210:
------------------------

    Attachment: CSVPrinter.java

My CSVPrinter.java file which works. This is basically for EXCEL_STRATEGY. For other strategies fallback to procedure is required.

> 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.


[jira] Issue Comment Edited: (SANDBOX-210) Commons CSV EXCELL_STRATEGY is reading CSV files with double quote and comma properly but not writing them back the same way

Posted by "Ram (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SANDBOX-210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12625607#action_12625607 ] 

pcsri1956 edited comment on SANDBOX-210 at 8/25/08 7:52 PM:
------------------------------------------------------

This issue happens in CSVPrinter class. Here is how I fixed it. Look in the comment below where change is suggested specifically for EXCEL_STRATEGY

private String escapeAndQuote(String value) {
.........    
          if (c == strategy.getEncapsulator()) {

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
                             sb.append('"').append(c);                    

                      // COMMENT ------------> changed from  sb.append('\\').append(c);  
 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 
        continue;
................
      }
      }

      was (Author: pcsri1956):
    This issue happens in CSVPrinter class. Here is how I fixed it. Look in the comment below where change is suggested specifically EXCEL_STRATEGY

private String escapeAndQuote(String value) {
.........    
          if (c == strategy.getEncapsulator()) {

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
                             sb.append('"').append(c);                    

                      // changed from  sb.append('\\').append(c);  
 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 
        continue;
................
      }
      }
  
> 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
>
> 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.


[jira] Updated: (SANDBOX-210) Commons CSV EXCELL_STRATEGY is reading CSV files with double quote and comma properly but not writing them back the same way

Posted by "Ram (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SANDBOX-210?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ram updated SANDBOX-210:
------------------------

    Attachment: CSVPrinter-patch.patch

> 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-patch.patch, 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.


[jira] Updated: (SANDBOX-210) Commons CSV EXCELL_STRATEGY is reading CSV files with double quote and comma properly but not writing them back the same way

Posted by "Ram (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SANDBOX-210?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ram updated SANDBOX-210:
------------------------

    Attachment: CSVPrinter.java

The CSV that Excel outputs differs from the standard in several respects: 


Leading and trailing whitespace is significant. 
A backslash is not a special character and is not used to escape anything. 
Quotes inside quoted strings are escaped with a double quote rather than a backslash.

> 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.


[jira] Updated: (SANDBOX-210) Commons CSV EXCELL_STRATEGY is reading CSV files with double quote and comma properly but not writing them back the same way

Posted by "Ram (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SANDBOX-210?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ram updated SANDBOX-210:
------------------------

    Attachment: CSVPrinter.java

> 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, CSVPrinter.patch
>
>
> 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.


[jira] Updated: (SANDBOX-210) Commons CSV EXCELL_STRATEGY is reading CSV files with double quote and comma properly but not writing them back the same way

Posted by "Ram (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SANDBOX-210?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ram updated SANDBOX-210:
------------------------

    Attachment:     (was: CSVPrinter.patch)

> 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-patch.patch, 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.


[jira] Issue Comment Edited: (SANDBOX-210) Commons CSV EXCELL_STRATEGY is reading CSV files with double quote and comma properly but not writing them back the same way

Posted by "Ram (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SANDBOX-210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12625734#action_12625734 ] 

pcsri1956 edited comment on SANDBOX-210 at 8/26/08 6:54 AM:
------------------------------------------------------

The CSV that Excel outputs differs from the standard in several respects: 


Leading and trailing whitespace is significant. 
A backslash is not a special character and is not used to escape anything. 
Quotes inside quoted strings are escaped with a double quote rather than a backslash.

Quoted from here : http://www.ssg.uab.edu/hdbstat/reports/api/hdbstat/reports/ExcelCSVPrinter.html

      was (Author: pcsri1956):
    The CSV that Excel outputs differs from the standard in several respects: 


Leading and trailing whitespace is significant. 
A backslash is not a special character and is not used to escape anything. 
Quotes inside quoted strings are escaped with a double quote rather than a backslash.
  
> 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.


[jira] Updated: (SANDBOX-210) Commons CSV EXCELL_STRATEGY is reading CSV files with double quote and comma properly but not writing them back the same way

Posted by "Ram (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SANDBOX-210?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ram updated SANDBOX-210:
------------------------

    Attachment:     (was: csvprinter-excelstratergy.patch)

> 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.patch
>
>
> 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.


[jira] Updated: (SANDBOX-210) Commons CSV EXCELL_STRATEGY is reading CSV files with double quote and comma properly but not writing them back the same way

Posted by "Ram (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SANDBOX-210?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ram updated SANDBOX-210:
------------------------

    Attachment:     (was: CSVPrinter-patch.patch)

> 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
>
> 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.


[jira] Updated: (SANDBOX-210) Commons CSV EXCELL_STRATEGY is reading CSV files with double quote and comma properly but not writing them back the same way

Posted by "Ram (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SANDBOX-210?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ram updated SANDBOX-210:
------------------------

    Attachment: CSVPrinter.java

> 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-patch.patch, 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.


[jira] Issue Comment Edited: (SANDBOX-210) Commons CSV EXCELL_STRATEGY is reading CSV files with double quote and comma properly but not writing them back the same way

Posted by "Ram (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SANDBOX-210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12625607#action_12625607 ] 

pcsri1956 edited comment on SANDBOX-210 at 8/25/08 8:02 PM:
------------------------------------------------------

This issue happens in CSVPrinter class. Here is how I fixed it. Look in the comment below where change is suggested specifically for EXCEL_STRATEGY

{code:title=CSVPrinter.java|borderStyle=solid}
// change sb.append('\\')  to sb.append('"')
private String escapeAndQuote(String value) {
.........    
          if (c == strategy.getEncapsulator()) {

             sb.append('"').append(c);                    
            
           // changed from sb.append('\\').append(c); 
 
             continue;
................
      }
      }

{code} 

      was (Author: pcsri1956):
    This issue happens in CSVPrinter class. Here is how I fixed it. Look in the comment below where change is suggested specifically for EXCEL_STRATEGY

{code:title=Bar.java|borderStyle=solid}
// change sb.append('\\')  to sb.append('"')
private String escapeAndQuote(String value) {
.........    
          if (c == strategy.getEncapsulator()) {

\\
                             sb.append('"').append(c);                    
\\
            // changed from {color:red}  sb.append('\\').append(c);  {color}
 \\ 
        continue;
................
      }
      }

{code} 
  
> 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
>
> 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.


[jira] Commented: (SANDBOX-210) Commons CSV EXCELL_STRATEGY is reading CSV files with double quote and comma properly but not writing them back the same way

Posted by "Ilya Egoshin (JIRA)" <ji...@apache.org>.
    [ 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.


[jira] Updated: (SANDBOX-210) Commons CSV EXCELL_STRATEGY is reading CSV files with double quote and comma properly but not writing them back the same way

Posted by "Ram (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SANDBOX-210?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ram updated SANDBOX-210:
------------------------

    Attachment:     (was: CSVPrinter.java)

> 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-patch.patch, 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.


[jira] Issue Comment Edited: (SANDBOX-210) Commons CSV EXCELL_STRATEGY is reading CSV files with double quote and comma properly but not writing them back the same way

Posted by "Ram (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SANDBOX-210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12625607#action_12625607 ] 

pcsri1956 edited comment on SANDBOX-210 at 8/25/08 7:53 PM:
------------------------------------------------------

This issue happens in CSVPrinter class. Here is how I fixed it. Look in the comment below where change is suggested specifically for EXCEL_STRATEGY

In CSVPrinter class ..
private String escapeAndQuote(String value) {
.........    
          if (c == strategy.getEncapsulator()) {

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
                             sb.append('"').append(c);                    

                      // COMMENT ------------> changed from  sb.append('\\').append(c);  
 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 
        continue;
................
      }
      }

      was (Author: pcsri1956):
    This issue happens in CSVPrinter class. Here is how I fixed it. Look in the comment below where change is suggested specifically for EXCEL_STRATEGY

private String escapeAndQuote(String value) {
.........    
          if (c == strategy.getEncapsulator()) {

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
                             sb.append('"').append(c);                    

                      // COMMENT ------------> changed from  sb.append('\\').append(c);  
 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 
        continue;
................
      }
      }
  
> 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
>
> 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.


[jira] Issue Comment Edited: (SANDBOX-210) Commons CSV EXCELL_STRATEGY is reading CSV files with double quote and comma properly but not writing them back the same way

Posted by "Ram (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SANDBOX-210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12625607#action_12625607 ] 

pcsri1956 edited comment on SANDBOX-210 at 8/25/08 8:03 PM:
------------------------------------------------------

This issue happens in CSVPrinter class. Here is how I fixed it. Look in the comment below where change is suggested specifically for EXCEL_STRATEGY

{code:title=CSVPrinter.java|borderStyle=solid}
// change sb.append('\\')  to sb.append('"')
private String escapeAndQuote(String value) {
.........    
          if (c == strategy.getEncapsulator()) {

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

{code} 

      was (Author: pcsri1956):
    This issue happens in CSVPrinter class. Here is how I fixed it. Look in the comment below where change is suggested specifically for EXCEL_STRATEGY

{code:title=CSVPrinter.java|borderStyle=solid}
// change sb.append('\\')  to sb.append('"')
private String escapeAndQuote(String value) {
.........    
          if (c == strategy.getEncapsulator()) {

             sb.append('"').append(c);                    
            
           // changed from sb.append('\\').append(c); 
 
             continue;
................
      }
      }

{code} 
  
> 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
>
> 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.


[jira] Updated: (SANDBOX-210) Commons CSV EXCELL_STRATEGY is reading CSV files with double quote and comma properly but not writing them back the same way

Posted by "Ram (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SANDBOX-210?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ram updated SANDBOX-210:
------------------------

    Attachment: CSVPrinter.java-patch

> 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, CSVPrinter.java-patch
>
>
> 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.


[jira] Issue Comment Edited: (SANDBOX-210) Commons CSV EXCELL_STRATEGY is reading CSV files with double quote and comma properly but not writing them back the same way

Posted by "Ram (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SANDBOX-210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12625607#action_12625607 ] 

pcsri1956 edited comment on SANDBOX-210 at 8/25/08 7:49 PM:
------------------------------------------------------

This issue happens in CSVPrinter class. Here is how I fixed it. Look in the comment below where change is suggested specifically EXCEL_STRATEGY

private String escapeAndQuote(String value) {
.........    
          if (c == strategy.getEncapsulator()) {
        sb.append('"').append(c);                      // changed from  sb.append('\\').append(c);  
        continue;
................
      }
      }

      was (Author: pcsri1956):
    This issue happens in CSVPrinter class. Here is how I fixed it. Look in the comment below where change is suggested specifically EXCEL_STRATEGY

private String escapeAndQuote(String value) {
.........    
    StringBuffer sb = new StringBuffer(value.length() + count);
    sb.append(strategy.getEncapsulator());
    for (int i = 0; i < value.length(); i++) {
      char c = value.charAt(i);

      if (c == strategy.getEncapsulator()) {
        sb.append('"').append(c);                      // changed from  sb.append('\\').append(c);  
        continue;
      }
      switch (c) {
        case '\n' :
          sb.append("\\n");
          break;
        case '\r' :
          sb.append("\\r");
          break;
        case '\\' :
          sb.append("\\\\");
          break;
        default :
          sb.append(c);
      }
    }
    sb.append(strategy.getEncapsulator());
    return sb.toString();
  }

}
  
> 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
>
> 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.


[jira] Updated: (SANDBOX-210) Commons CSV EXCELL_STRATEGY is reading CSV files with double quote and comma properly but not writing them back the same way

Posted by "Ram (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SANDBOX-210?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ram updated SANDBOX-210:
------------------------

    Attachment:     (was: CSVPrinter.java)

> 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.patch
>
>
> 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.


[jira] Updated: (SANDBOX-210) Commons CSV EXCELL_STRATEGY is reading CSV files with double quote and comma properly but not writing them back the same way

Posted by "Ram (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SANDBOX-210?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ram updated SANDBOX-210:
------------------------

    Attachment: CSVPrinter.java

> 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-excelstratergy.patch, 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.


[jira] Updated: (SANDBOX-210) Commons CSV EXCELL_STRATEGY is reading CSV files with double quote and comma properly but not writing them back the same way

Posted by "Ram (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SANDBOX-210?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ram updated SANDBOX-210:
------------------------

    Attachment:     (was: CSVPrinter.java)

> 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.


[jira] Updated: (SANDBOX-210) Commons CSV EXCELL_STRATEGY is reading CSV files with double quote and comma properly but not writing them back the same way

Posted by "Ram (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SANDBOX-210?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ram updated SANDBOX-210:
------------------------

    Attachment: CSVPrinter.patch

> 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.patch
>
>
> 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.


[jira] Issue Comment Edited: (SANDBOX-210) Commons CSV EXCELL_STRATEGY is reading CSV files with double quote and comma properly but not writing them back the same way

Posted by "Ram (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SANDBOX-210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12625614#action_12625614 ] 

pcsri1956 edited comment on SANDBOX-210 at 8/25/08 8:11 PM:
------------------------------------------------------

My CSVPrinter.java file which works. This is basically for EXCEL_STRATEGY. For other strategies fallback to old procedure is required.

      was (Author: pcsri1956):
    My CSVPrinter.java file which works. This is basically for EXCEL_STRATEGY. For other strategies fallback to procedure is required.
  
> 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.


[jira] Issue Comment Edited: (SANDBOX-210) Commons CSV EXCELL_STRATEGY is reading CSV files with double quote and comma properly but not writing them back the same way

Posted by "Ram (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SANDBOX-210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12625607#action_12625607 ] 

pcsri1956 edited comment on SANDBOX-210 at 8/26/08 6:51 AM:
------------------------------------------------------

This issue happens in CSVPrinter class. Here is how I fixed it. Look in the comment below where change is suggested specifically for EXCEL_STRATEGY

{code:title=CSVPrinter.java|borderStyle=solid}
// change sb.append('\\')  to sb.append('"')
private String escapeAndQuote(String value) {
.........    
          if (c == strategy.getEncapsulator()) {

             sb.append('"').append(c);                    
            
           // changed from sb.append('\\').append(c); 



         case '\\' :
          sb.append("\\"); 
           
         // changed from //// to // 
    
          continue;
................
      }
      }

{code} 

      was (Author: pcsri1956):
    This issue happens in CSVPrinter class. Here is how I fixed it. Look in the comment below where change is suggested specifically for EXCEL_STRATEGY

{code:title=CSVPrinter.java|borderStyle=solid}
// change sb.append('\\')  to sb.append('"')
private String escapeAndQuote(String value) {
.........    
          if (c == strategy.getEncapsulator()) {

             sb.append('"').append(c);                    
            
           // changed from sb.append('\\').append(c); 



 case '\\' :
          sb.append("\\"); 
           
         // changed from //// to // 
    
          continue;
................
      }
      }

{code} 
  
> 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.


[jira] Issue Comment Edited: (SANDBOX-210) Commons CSV EXCELL_STRATEGY is reading CSV files with double quote and comma properly but not writing them back the same way

Posted by "Ram (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SANDBOX-210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12625607#action_12625607 ] 

pcsri1956 edited comment on SANDBOX-210 at 8/25/08 7:57 PM:
------------------------------------------------------

This issue happens in CSVPrinter class. Here is how I fixed it. Look in the comment below where change is suggested specifically for EXCEL_STRATEGY

In CSVPrinter class ..
private String escapeAndQuote(String value) {
.........    
          if (c == strategy.getEncapsulator()) {

\\
                             sb.append('"').append(c);                    
\\
                      // COMMENT ------------> changed from {color:red}  sb.append('\\').append(c);  {color}
 \\ 
        continue;
................
      }
      }

      was (Author: pcsri1956):
    This issue happens in CSVPrinter class. Here is how I fixed it. Look in the comment below where change is suggested specifically for EXCEL_STRATEGY

In CSVPrinter class ..
private String escapeAndQuote(String value) {
.........    
          if (c == strategy.getEncapsulator()) {

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
                             sb.append('"').append(c);                    

                      // COMMENT ------------> changed from {color:red}  sb.append('\\').append(c);  {color}
 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 
        continue;
................
      }
      }
  
> 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
>
> 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.


[jira] Updated: (SANDBOX-210) Commons CSV EXCELL_STRATEGY is reading CSV files with double quote and comma properly but not writing them back the same way

Posted by "Henri Yandell (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SANDBOX-210?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Henri Yandell updated SANDBOX-210:
----------------------------------

    Fix Version/s: CSV 1.0

Need to do some work to confirm that strategies are symmetric.

> 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
>             Fix For: CSV 1.0
>
>         Attachments: CSVPrinter.java, CSVPrinter.java-patch, CSVPrinterTest.patch
>
>
> 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.


[jira] Issue Comment Edited: (SANDBOX-210) Commons CSV EXCELL_STRATEGY is reading CSV files with double quote and comma properly but not writing them back the same way

Posted by "Ram (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SANDBOX-210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12625607#action_12625607 ] 

pcsri1956 edited comment on SANDBOX-210 at 8/25/08 7:51 PM:
------------------------------------------------------

This issue happens in CSVPrinter class. Here is how I fixed it. Look in the comment below where change is suggested specifically EXCEL_STRATEGY

private String escapeAndQuote(String value) {
.........    
          if (c == strategy.getEncapsulator()) {

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
                             sb.append('"').append(c);                    

                      // changed from  sb.append('\\').append(c);  
 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 
        continue;
................
      }
      }

      was (Author: pcsri1956):
    This issue happens in CSVPrinter class. Here is how I fixed it. Look in the comment below where change is suggested specifically EXCEL_STRATEGY

private String escapeAndQuote(String value) {
.........    
          if (c == strategy.getEncapsulator()) {

                             sb.append('"').append(c);                      // changed from  sb.append('\\').append(c);  
        
        continue;
................
      }
      }
  
> 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
>
> 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.


[jira] Updated: (SANDBOX-210) Commons CSV EXCELL_STRATEGY is reading CSV files with double quote and comma properly but not writing them back the same way

Posted by "Ram (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SANDBOX-210?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ram updated SANDBOX-210:
------------------------

    Attachment: CSVPrinter.java

> 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, CSVPrinter.java-patch
>
>
> 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.


[jira] Issue Comment Edited: (SANDBOX-210) Commons CSV EXCELL_STRATEGY is reading CSV files with double quote and comma properly but not writing them back the same way

Posted by "Ram (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SANDBOX-210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12625787#action_12625787 ] 

pcsri1956 edited comment on SANDBOX-210 at 8/26/08 10:22 AM:
-------------------------------------------------------

Patch file for this change is added.  Please fix this issue.

      was (Author: pcsri1956):
    Patch file for this change. 
  
> 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-patch.patch, 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.


[jira] Issue Comment Edited: (SANDBOX-210) Commons CSV EXCELL_STRATEGY is reading CSV files with double quote and comma properly but not writing them back the same way

Posted by "Ram (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SANDBOX-210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12625607#action_12625607 ] 

pcsri1956 edited comment on SANDBOX-210 at 8/26/08 6:51 AM:
------------------------------------------------------

This issue happens in CSVPrinter class. Here is how I fixed it. Look in the comment below where change is suggested specifically for EXCEL_STRATEGY

{code:title=CSVPrinter.java|borderStyle=solid}
// change sb.append('\\')  to sb.append('"')
private String escapeAndQuote(String value) {
.........    
          if (c == strategy.getEncapsulator()) {

             sb.append('"').append(c);                    
            
           // changed from sb.append('\\').append(c); 



 case '\\' :
          sb.append("\\"); 
           
         // changed from //// to // 
    
          continue;
................
      }
      }

{code} 

      was (Author: pcsri1956):
    This issue happens in CSVPrinter class. Here is how I fixed it. Look in the comment below where change is suggested specifically for EXCEL_STRATEGY

{code:title=CSVPrinter.java|borderStyle=solid}
// change sb.append('\\')  to sb.append('"')
private String escapeAndQuote(String value) {
.........    
          if (c == strategy.getEncapsulator()) {

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

{code} 
  
> 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.