summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/AbstractCsv.php2
-rw-r--r--src/Config/Output.php2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/AbstractCsv.php b/src/AbstractCsv.php
index 9259fd3..d541fd3 100644
--- a/src/AbstractCsv.php
+++ b/src/AbstractCsv.php
@@ -94,7 +94,7 @@ abstract class AbstractCsv implements JsonSerializable, IteratorAggregate
*/
protected function __construct($path, $open_mode = 'r+')
{
- $this->flags = SplFileObject::READ_CSV | SplFileObject::DROP_NEW_LINE;
+ $this->flags = SplFileObject::READ_CSV | SplFileObject::READ_AHEAD | SplFileObject::SKIP_EMPTY;
$this->open_mode = strtolower($open_mode);
$this->path = $this->normalizePath($path);
$this->initStreamFilter($this->path);
diff --git a/src/Config/Output.php b/src/Config/Output.php
index 991b9de..ca2cf44 100644
--- a/src/Config/Output.php
+++ b/src/Config/Output.php
@@ -181,8 +181,8 @@ trait Output
$bom = $this->output_bom;
}
$csv = $this->getIterator();
- $csv->rewind();
$csv->setFlags(SplFileObject::READ_CSV);
+ $csv->rewind();
if (!empty($bom)) {
$csv->fseek(mb_strlen($input_bom));
}