>Actually, it doesn't work well.
>
>If I have a text file with a bunch of lines one after the other, your code will work. However, if I have a text file including empty lines, those empty lines are completed removed when using that code. I need to preserve them as they are part of the text. What I need to avoid is the weird behavior of the LF which was included in my previous version.Well, that is weird behavior (the thing with the LF). If your empty lines contain more than just a CRLF (like, say they contain a space or a tab), then my example will retain that "empty" line. But, anyway, it doesn't matter ... it sounds like you found a workable solution.
~~Bonnie