Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: parse files with '\r' symbols as line ending correctly #1312

Merged
merged 1 commit into from
Aug 22, 2024

Conversation

SGSSGene
Copy link
Contributor

Fix #1309

The stream class only considers '\n' as new lines. This works as long as the line ending is '\n' or '\r\n'.
But for files with only '\r' (as with old mac text files) it doesn't work as expected.

This PR extends the stream class. It remembers the first '\r' or '\n' encounter and uses that as a line ending.

@SGSSGene SGSSGene force-pushed the fix/crlineencoding branch 2 times, most recently from 326f4ab to 9e09d8b Compare August 22, 2024 09:11
@jbeder jbeder merged commit ee9c4d1 into jbeder:master Aug 22, 2024
33 checks passed
@Hind-M
Copy link

Hind-M commented Aug 22, 2024

Nice! Thank you for fixing this!
Is there an upcoming release scheduled soon?
Would be really great! 🙂

@SGSSGene SGSSGene deleted the fix/crlineencoding branch August 22, 2024 14:55
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.

Carriage return is not considered as a line break character
3 participants