deal with different line endings CR, LF, CRLF