From: Bira Date: 2006-05-06T01:57:46+09:00 Subject: Re: CSV::IllegalFormatError (Need to club data entry person) On 5/5/06, Sean Clark wrote: > Is there a way to get around this error and escape the "B" properly > before opening the file in CSV.open, or would I be better to just flag > this record and move on? It's just a guess, but maybe you could try replacing every double-quote character that isn't either preceded or followed by a comma with a single quote? Something like the untested code below: line.gsub(/[^,]"[^,]/,"'") It would probably require reading the whole file first, writing out a corrected version, and then calling the CSV methods on that, but it beats doing it by hand :). -- Bira http://compexplicita.blogspot.com http://sinfoniaferida.blogspot.com