CSV-77 RFC 4180 (DEFAULT) format is wrong; should not ignore spaces or blank lines
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1305482 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
4406fba31c
commit
5063b16c7a
|
@ -57,17 +57,38 @@ public class CSVFormat implements Serializable {
|
|||
private static CSVFormat PRISTINE =
|
||||
new CSVFormat(DISABLED, DISABLED, DISABLED, DISABLED, false, false, false, null, null);
|
||||
|
||||
/** Standard comma separated format as defined by <a href="http://tools.ietf.org/html/rfc4180">RFC 4180</a>. */
|
||||
/**
|
||||
* Standard comma separated format, as for {@link #RFC4180} but allowing blank lines.
|
||||
* <ul>
|
||||
* <li>withDelimiter(',')</li>
|
||||
* <li>withEncapsulator('"')</li>
|
||||
* <li>withEmptyLinesIgnored(true)</li>
|
||||
* <li>withLineSeparator(CRLF)</li>
|
||||
* </ul>
|
||||
*/
|
||||
public static final CSVFormat DEFAULT =
|
||||
PRISTINE.
|
||||
withDelimiter(',')
|
||||
.withEncapsulator('"')
|
||||
.withLeadingSpacesIgnored(true)
|
||||
.withTrailingSpacesIgnored(true)
|
||||
.withEmptyLinesIgnored(true)
|
||||
.withLineSeparator(CRLF)
|
||||
;
|
||||
|
||||
/**
|
||||
* Comma separated format as defined by <a href="http://tools.ietf.org/html/rfc4180">RFC 4180</a>.
|
||||
* <ul>
|
||||
* <li>withDelimiter(',')</li>
|
||||
* <li>withEncapsulator('"')</li>
|
||||
* <li>withLineSeparator(CRLF)</li>
|
||||
* <li></li>
|
||||
* </ul>
|
||||
*/
|
||||
public static final CSVFormat RFC4180 =
|
||||
PRISTINE.
|
||||
withDelimiter(',')
|
||||
.withEncapsulator('"')
|
||||
.withLineSeparator(CRLF)
|
||||
;
|
||||
|
||||
/**
|
||||
* Excel file format (using a comma as the value delimiter).
|
||||
|
|
Loading…
Reference in New Issue