Uploaded image for project: 'Commons CSV'
  1. Commons CSV
  2. CSV-3

CSVPrinter#escapeAndQuote(String) doesn't adhere to CSV standard

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.0
    • Printer
    • None

    Description

      All the descriptions of the CSV format that I've seen state that:

      • Double quotes (") are escaped using two double quotes (""), rather than a backslash (\").
      • Embedded line breaks are allowed and don't need to be escaped... just enclose the field in double quotes.
      • Because backslashes are not used to escape double quotes or line breaks, the backslashes themselves do not need to be escaped.

      CSVPrinter#escapeAndQuote(String) breaks these rules. Why?

      http://www.creativyst.com/Doc/Articles/CSV/CSV01.htm
      http://en.wikipedia.org/wiki/Comma-separated_values

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              sdanig Daniel Gredler
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: