GNOME Bugzilla – Bug 632356
CR-LFs get duplicated whenever they fall on READ_CHUNK_SIZE boundaries
Last modified: 2010-10-18 12:05:22 UTC
Created attachment 172541 [details] Text file showing one additional line break when opened with gedit From https://bugs.launchpad.net/ubuntu/+source/gedit/+bug/662051 "Gedit massively screws up files whose lines are terminated by CR-LF (i.e., Windows-style newlines, or 0D 0A in hex). It reads in a file in 8192-byte chunks, and then if a CR-LF combo happens to fall on a boundary so that the CR is on one side and the LF is on the other, then Gedit translates BOTH of them into a newline. The net effect is that quite a few newlines get randomly duplicated here and there in any reasonably long file with Windows-style newlines when you load it." I've attached an example text file containing 2732 lines, ending with CR-LF each. If you open the file with gedit and scroll to the end, you'll find an additional line break after line 2731 that should not be there.
Thanks for the bug report. This particular bug has already been reported into our bug tracking system, but please feel free to report any further bugs you find. *** This bug has been marked as a duplicate of bug 631468 ***