correct handling of non-unix line termination