Date: 2007-03-01 16:32
Sender: David Welton
This following "fixes" the problem, but then the test
suite
reports failures, because it considers having an embedded
quote an error. Perhaps it should be a configuration
option, because like it or not, the data I'm dealing with
has embedded quotes. I suppose I could try and strip them
first, but... then we're sort of back to square one, as they
say.
Thankyou, Dave
--- csv.rb 2 Sep 2006 03:06:33 -0000 1.11
+++ csv.rb 1 Mar 2007 16:29:09 -0000
@@ -331,6 +331,7 @@
quoted = cr = false
c = nil
last_idx = idx
+
while c = src[idx]
unless quoted
fschar = (c == fs_str[fs_idx])
@@ -367,8 +368,6 @@
last_idx += 1
quoted = false
state = :ST_QUOTE
- else
- raise IllegalFormatError
end
elsif state == :ST_QUOTE
cell << c.chr
|