public static function convertLineEndings($input)
    {
        # This must be first as it is the most specific of the endlines.
        $output = str_replace("\r\n", "\n",  $input);
        
        # There are some strange cases where it is just \r
        $output = str_replace("\r",   "\n",  $output);
        
        # the system might be windows!
        $output = str_replace("\n", PHP_EOL, $output);
        
        return $output;
    }