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

Class encoding fails if input only contains one line without new line? #34

Open
proycon opened this issue Jun 7, 2017 · 1 comment
Open
Assignees

Comments

@proycon
Copy link
Owner

proycon commented Jun 7, 2017

Discovered by @fkunneman; output file was only 2-bytes (the initial null byte and version marker).

Input text was just: prachtig apparaat en droogt goed kreukelvrij fijn de verlichting binnenin voelt heel robuust en ziet er ook erg leuk uit

Also verify this doesn't imply we lose the last sentence on larger encodings (can't imagine it does as the tests probably cover this, but better check).

@drupchen
Copy link

I have had the same problem with a file containing a single line without new line.

Solved it simply by adding a new line at the end of file.

Note: adding the new line at beginning of the file (no trailing new line) yields a decoded file only containing \n. So it looks like the classencoder expects every line to end with a trailing new line, and discards all content not followed by a newline.

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

No branches or pull requests

2 participants