> Nevermind the previous version, I've solved a few bugs in it (like unquoted 
> numbers and correctly handling blank fields).

1. Any string without commas or newlines can be unquoted; no need to restrict it to 
digits.

2. In a quoted string, "" (that is, two double quotes) stands for one double quote 
character.  That is, the strings


  "This is a quoted string"
  K"oln

appear in a CSV file as

  """This is a quoted string"""
  "K""oln"

Also, be sure to support newlines within quoted strings (I think you do already).  
Many CSV parsers fail to do this, with nasty results.

--KW 8-)
-- 
Keith Wansbrough <[EMAIL PROTECTED]>
http://www.cl.cam.ac.uk/users/kw217/
University of Cambridge Computer Laboratory.

_______________________________________________
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to