[Haskell-cafe] implementing a csv reader

Henning Thielemann lemming at henning-thielemann.de
Thu Aug 24 06:24:43 EDT 2006


On Wed, 23 Aug 2006, Robert Dockins wrote:

> 
> On Aug 23, 2006, at 3:37 PM, Henk-Jan van Tuyl wrote:
> 
> > 
> > L.S.,
> > 
> > Reading and writing a comma seperated datafile doesn't have to be that
> > complicated; the following is an easy way to read a CSV file into a list of
> > tuples and display the list on screen:
> 
> "For every complex problem, there is a solution which is simple, neat, and
> wrong."  -- HL Mencken
> 
> 
> Although it seems straightforward at first, CSV suffers from text escaping
> complexities, just as does every other general purpose plain-text encoding.
> Most notably, a newline embedded inside double quotes does not end a record.

I also think that quotes within quotes are represented by "" rather than
\" in CSV.


More information about the Haskell-Cafe mailing list