nozavroni / csvelte

🕺🏻 CSV and Tabular Data library for PHP
http://phpcsv.com/
Other
6 stars 0 forks source link

reader bug - if space(s) around delimiter, they aren't ignored #190

Closed nozavroni closed 6 years ago

nozavroni commented 6 years ago

While working on the SniffHeaderByDateType sniffer helper, I noticed that if there are spaces around the delimiter character, they interfere with the code used to split a line into fields. You end up with inconsistent results (spaces where they shouldn't be, delimiter char, quote char in the field, etc.). This happened when I was tinkering with the "tiv_2011","tiv_2012" headers within the "headerCommaQuoteNonnumeric" test CSV data. Try to reproduce and then fix.