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

Output file has an extra \n character between each line on windows #66

Closed
nocalla opened this issue Oct 26, 2017 · 0 comments
Closed

Output file has an extra \n character between each line on windows #66

nocalla opened this issue Oct 26, 2017 · 0 comments
Assignees
Labels

Comments

@nocalla
Copy link
Member

nocalla commented Oct 26, 2017

This looks like a manifestation of the handling of Windows files outlined here,

Be careful using codecs.open() to read files on Windows. The docs say: """Note Files are always opened in binary mode, even if no binary mode was specified. This is done to avoid data loss due to encodings using 8-bit values. This means that no automatic conversion of '\n' is done on reading and writing.""" This means that your lines will end in \r\n and you will need/want to strip those off.

nocalla added a commit that referenced this issue Oct 26, 2017
…etween rows in Windows

Should fix issue #66. Looks like py2 version will work okay as it reads in binary.
@nocalla nocalla added the bug label Oct 26, 2017
@nocalla nocalla self-assigned this Oct 26, 2017
@nocalla nocalla closed this as completed Oct 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant