2929 */
3030public class CSVFormat implements Serializable {
3131
32+ /** According to RFC 4180, line breaks are delimited by CRLF */
33+ private static final String CRLF = "\r \n " ;
3234 private final char delimiter ;
3335 private final char encapsulator ;
3436 private final char commentStart ;
@@ -49,7 +51,7 @@ public class CSVFormat implements Serializable {
4951 static final char DISABLED = '\ufffe' ;
5052
5153 /** Standard comma separated format as defined by <a href="http://tools.ietf.org/html/rfc4180">RFC 4180</a>. */
52- public static final CSVFormat DEFAULT = new CSVFormat (',' , '"' , DISABLED , DISABLED , true , true , false , true , " \r \n " );
54+ public static final CSVFormat DEFAULT = new CSVFormat (',' , '"' , DISABLED , DISABLED , true , true , false , true , CRLF );
5355
5456 /**
5557 * Excel file format (using a comma as the value delimiter).
@@ -62,10 +64,10 @@ public class CSVFormat implements Serializable {
6264 *
6365 * <pre>CSVFormat fmt = CSVFormat.EXCEL.withDelimiter(';');</pre>
6466 */
65- public static final CSVFormat EXCEL = new CSVFormat (',' , '"' , DISABLED , DISABLED , false , false , false , false , " \r \n " );
67+ public static final CSVFormat EXCEL = new CSVFormat (',' , '"' , DISABLED , DISABLED , false , false , false , false , CRLF );
6668
6769 /** Tab-delimited format, with quote; leading and trailing spaces ignored. */
68- public static final CSVFormat TDF = new CSVFormat ('\t' , '"' , DISABLED , DISABLED , true , true , false , true , " \r \n " );
70+ public static final CSVFormat TDF = new CSVFormat ('\t' , '"' , DISABLED , DISABLED , true , true , false , true , CRLF );
6971
7072 /**
7173 * Default MySQL format used by the <tt>SELECT INTO OUTFILE</tt> and
0 commit comments