ashrafmhd09 / php-csv-parser

Automatically exported from code.google.com/p/php-csv-parser
0 stars 0 forks source link

settings are not respected #15

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
$csv = new File_CSV_DataSource;
$csv->settings(array('length' => 5)); //if this line is commented out, then 
file is correctly parsed
$csv->load('myFile.csv');

What is the expected output? What do you see instead?
$csv->settings(array('length' => 5)) causes the file to be incorrectly parsed.
$csv->getRows() now shows multiple incorrectly parsed rows - over 200 rows of 
incorrectly parsed rows with 1-2 columns in each row, instead of 5 rows of 15 
columns each.
Expected output is that only 5 rows should be parsed, with the correct number 
of columns.

What version of the product are you using? On what operating system?
1.0.1 on Windows 7 (XAMPP)

Please provide any additional information below.
I have attached a file showing correct output and incorrect output

Original issue reported on code.google.com by jonathan.behr@gmail.com on 13 Aug 2010 at 11:49

Attachments:

GoogleCodeExporter commented 9 years ago
I have further determined that the error is only caused when the 'length' is 
120 or less. 

If 'length' = 120, 119, 118 then the import is partially broken - only the last 
row is incorrectly imported.

If 'length' = 117 or less, the import is completely broken (as described in my 
original post).

Original comment by jonathan.behr@gmail.com on 13 Aug 2010 at 12:01