Skip to content

Use \r\n (CRLF) newlines by default#777

Open
ybasket wants to merge 1 commit into
mainfrom
use-rfc-compliant-newline
Open

Use \r\n (CRLF) newlines by default#777
ybasket wants to merge 1 commit into
mainfrom
use-rfc-compliant-newline

Conversation

@ybasket

@ybasket ybasket commented Jun 1, 2026

Copy link
Copy Markdown
Collaborator

To fully comply with RFC 4180 by default, this changes the default newline to \r\n. It also extracts both the default separator and the newline values into constants so they're not repeated (potentially inconsistently) across the code.

To fully comply with ISO 4180 by default, this changes the default newline to `\r\n`. It also extracts both the default separator and the newline values into constants so they're not repeated (potentially inconsistently) across the code.
@ybasket ybasket requested a review from a team as a code owner June 1, 2026 13:59
/**
* Default separator value for CSV data according to RFC-4180. Note that all pipes allow customizing this.
*/
val csvDataDefaultSeparator: Char = ','

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't particularly like the csvData prefix, but people will usually have import fs2.data.csv._ and I don't want source clashes with locally defined defaultSeparator and defaultNewline – just sitting on a codebase where those are actually defined 🙄 Open for better ideas.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant