Skip to content

Conversation

@gbwey
Copy link

@gbwey gbwey commented Oct 4, 2013

This is related to this pull request
yesodweb/shakespeare#113 referrring to https://gist.github.com/gbwey/6833805

This change to readfile will filter out carriage returns as does Data.Text.IO.readFile.
Avoids the situation in windows where you read a file/then write it back and it is different.

Is there a reason why we don't just use Data.Text.IO.readFile?

Thanks,
Grant

@gregwebs
Copy link
Owner

gregwebs commented Oct 4, 2013

I agree that using readFile from Text is probably best.

One potential difference though is the current use of lenientDecode: we don't want programs to crash from reading a file with an invalid UTF character.

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.

2 participants