From f2310e05d09efe2b3f2ca22ee025ae59e507f5ef Mon Sep 17 00:00:00 2001 From: Mark Baker Date: Fri, 5 Aug 2011 14:37:30 +0000 Subject: [PATCH] Bugfix: Work item 16246 - reader/CSV fails on this file auto_detect_line_endings now set in CSV reader git-svn-id: https://phpexcel.svn.codeplex.com/svn/trunk@77805 2327b42d-5241-43d6-9e2a-de5ac946f064 --- Classes/PHPExcel/Reader/CSV.php | 5 +++++ changelog.txt | 2 ++ 2 files changed, 7 insertions(+) diff --git a/Classes/PHPExcel/Reader/CSV.php b/Classes/PHPExcel/Reader/CSV.php index d389c162..ee342acb 100644 --- a/Classes/PHPExcel/Reader/CSV.php +++ b/Classes/PHPExcel/Reader/CSV.php @@ -217,6 +217,9 @@ class PHPExcel_Reader_CSV implements PHPExcel_Reader_IReader } $objPHPExcel->setActiveSheetIndex( $this->_sheetIndex ); + $lineEnding = ini_set('auto_detect_line_endings'); + ini_set('auto_detect_line_endings', true); + // Open file $fileHandle = fopen($pFilename, 'r'); if ($fileHandle === false) { @@ -287,6 +290,8 @@ class PHPExcel_Reader_CSV implements PHPExcel_Reader_IReader $this->_contiguousRow = $currentRow; } + ini_set('auto_detect_line_endings', $lineEnding); + // Return return $objPHPExcel; } // function loadIntoExisting() diff --git a/changelog.txt b/changelog.txt index 71cc9029..e2e23ade 100644 --- a/changelog.txt +++ b/changelog.txt @@ -36,6 +36,8 @@ Fixed in SVN: - Bugfix: (MBaker) Work item 15786 - RangeToArray strange array keys - Bugfix: (MBaker) Work item 15762 - INDIRECT() function doesn't work with named ranges - Bugfix: (MBaker) Locale-specific fix to text functions when passing a boolean argument instead of a string +- Bugfix: (MBaker) Work item 16246 - reader/CSV fails on this file + auto_detect_line_endings now set in CSV reader - General: (MBaker) Work item 15405 - Two easy to fix Issues concerning PHPExcel_Token_Stack (l10n/UC) - General: (MBaker) Work item 15461 - Locale file paths not fit for windows