On Aug 20, 2010, at 9:51 AM, Fil Sesto wrote:
if I write:
csv << [45678, 45678, '"stringa"']
the result is:
45678,45678,"""stringa"""
:-(
But I would like this:
45678,45678,"stringa"
You might "like" it, but the "quotes" are not needed in CSV unless the
value requires them to be present (such as the presence of a comma or
a quote.
Look at what you get with:
puts CSV.generate {|csv|
csv << [1,'a','"b"', 'c,c', 'd"d']
}
-Rob
Rob Biedenharn
[email protected] http://AgileConsultingLLC.com/
[email protected] http://GaslightSoftware.com/
--
You received this message because you are subscribed to the Google Groups "Ruby on
Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.