Skip to content

Conversation

@clue
Copy link
Owner

@clue clue commented Jan 13, 2022

This changeset adds support for specifying a custom EOL character. This can be useful when creating a CSV file using the Encoder for Windows using the CRLF sequence (\r\n) like this:

$encoder = new Clue\React\Csv\Encoder($this->output, ',', '"', '\\', "\r\n");

This is supported natively by PHP as of PHP 8.1, but this PR also implements the same feature for all supported PHP versions.

Refs https://www.php.net/manual/en/migration81.new-features.php#migration81.new-features.standard

@clue clue added the new feature New feature or request label Jan 13, 2022
@clue clue added this to the v1.2.0 milestone Jan 13, 2022
@clue clue requested a review from SimonFrings January 13, 2022 06:40
@clue clue changed the title Support custom EOL character Support custom EOL character when encoding CSV Jan 13, 2022
@SimonFrings SimonFrings merged commit 5269154 into clue:master Jan 13, 2022
@clue clue deleted the custom-eol branch January 13, 2022 09:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants