nozavroni / csvelte

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

How do we want to handle quoted special chars within CSVelte\Reader? #26

Closed deni-zen closed 8 years ago

deni-zen commented 8 years ago

The Stream input class implements HandlesQuotedLineTerminatorsTrait, which allows it to (although I didn't really want to give the input classes too much knowledge of WHAT they are reading, but oh well it works for now...) The reader needs to do something similar with special chars when it splits up the rows into columns but it isn't quite as tricky. It simply looks for quoted strings and replaces newlines and special characters (delimiters, quotes, etc.) with an "encoded" version of them and then once it has its columns, it switches them back. Right now all this functionality is in the main Reader class. Probably should move it into a trait as well. Or possibly even move it into its own special little class or utility function.

nozavroni commented 8 years ago

I don't know wtf this is talking about. Closing...