Maybe this approach will work:
% svn diff
Index: csvtohtml.php
===================================================================
--- csvtohtml.php (revision 1602603)
+++ csvtohtml.php (working copy)
@@ -313,7 +313,8 @@
curl_setopt($curl, CURLOPT_HEADER, false);
$curl_data = curl_exec($curl);
curl_close($curl);
- $file_arr = explode( "\r\n", $curl_data);
+ // support CRLF (windows), LF (linux, mac), or CR (old mac) line endings.
+ $file_arr = preg_split("/\r\n|\n|\r/", $curl_data);
//remove last item from array
$x = count ( $file_arr ) - 1;