Re:Miller is like sed, awk, cut, join, and sort for name-ind...
by iampims on Sunday August 16, 2015 @01:24PM
(#10069543)
I found the pandas tests to be a great source for implementing robust CSV parsers:
https://github.com/pydata/pandas/blob/master/pandas/io/tests...
Re:Miller is like sed, awk, cut, join, and sort for name-ind...
by im3w1l on Sunday August 16, 2015 @09:27AM
(#10068836)
Auto-detecting format sounds like a recipe for injection attacks.
Re:Miller is like sed, awk, cut, join, and sort for name-ind...
by john_kerl on Sunday August 16, 2015 @08:01AM
(#10068677)
semicolons etc you get with FS RS OS etc. number commas I can probably implement with locale; i'll look. and quotes are definitely to do. :)
Re:Miller is like sed, awk, cut, join, and sort for name-ind...
by gambiter on Sunday August 16, 2015 @08:21AM
(#10068715)
CSV stands for 'Comma-Separated Values', not 'Semicolon-Separated Values'.
Seeing as this was downvoted, I'm just pointing out that bemoaning how the CSV format is fragmented and then using it incorrectly is the precise reason it is fragmented. It wasn't originally meant to be extended in so many ways, so there really isn't room to complain when a library doesn't magically figure out your personal delimiter or qualifier.
It's a pity that the CSV file format is so fragmented. It's all too common that a CSV file written by tool A can't be read by tool B.
Only very few tools do it right. For example, I think the ruby CSV module has a heuristic to automatically detect the "style" of CSV files, which is pretty neat.