Class encoding fails if input only contains one line without new line?
proycon opened this issue · 1 comments
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).
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.