in reply to line endings

There was a thread a day or two ago that handled this topic pretty well, Handling Mac, Unix, Win/DOS newlines at readtime.... It should give you some insight.