convert line endings to \n