On 10/17/2011 11:03 PM, Paul Tremblay wrote:
> You ask me how to parse a string in which I don't know the
> delimiter, but you might as well ask me to parse a file
> when I don't know the path or the encoding. The delimiter
> must be given
And *that* is the problem!
If CSV doesn't mean CSV,
you cannot parse it without asking questions.
That is exactly the issue.
That is why the RFC exists.
That is why people pay attention to it.
And, honestly now, how often do you encounter a file
with a .csv extension that uses whitespace
delimiters? In my experience, it is very rare.
For the exchange of scientific data, it is inexcusable.
The extension is usually .txt when there is a
white-space delimiter. Which is fine: using a
.txt extension for data is like saying, "good
luck figuring out how to parse this if I did
not include a header file". Using a .csv extension
should always mean, "conforms to RFC 4180".
Cheers,
Alan
|