Observed in KDE / Kontact 4.8.5 r2: Saving a .csv attachment produces a file 1 byte smaller than the original. The missing byte is the last newline. While entering the bug, I remember having a virtual machine with KDE 4.11.2 and the bug does not occur there. I submit the bug report anyway so that people know that it may be fixed in a more recent KDE. Reproducible: Always Steps to Reproduce: 1. create a test file, for example "echo test > test.csv" 2. attach test.csv to an e-mail (leaving attachment properties to default: type text/csv, encoding: 7bit) 3. receive e-mail 4. right click on attachment at end of e-mail and choose "save", for example as test-v2.csv 5. compare files with "diff" and "cmp" Actual Results: diff: No newline at end of file cmp: EOF on test-v2.csv Expected Results: diff: no output (no difference) cmp: no output (no difference) (1) All newlines involved (including newlines in the mbox file if saving the full message) are just 0x0a. No CR LF newlines. (2) Reproduced with a real-world .csv file, head and tail of the latter file and the 1-line "echo test" test.csv file on 4.8.5 r2. Workaround: "echo >>test-v2.csv" after saving adds the missing newline.
This bug has only been reported for versions before 4.14, which have been unsupported for at least two years now. Can anyone tell if this bug still present? If noone confirms this bug for a Framework-based version of kmail2 (version 5.0 or later, as part of KDE Applications 15.12 or later), it gets closed in about three months.
Just as announced in my last comment, I close this bug. If you encounter it again in a recent version (at least 5.0 aka 15.08), please open a new one unless it already exists. Thank you for all your input.
As explained in the 2nd paragraph of the initial report, the bug was already fixed in 4.11.2 and the purpose of the report was to document a workaround for other people running into this bug with older versions. I can confirm that the bug is also not present in KMail5 16.08.