> I have a form that uploads a CSV file and puts it into a
DB. I am trying to
> make it as "idiot-proof" as I can with as little
responsibility on the enduser
> as possible to provide "proper format" data. Is there a
way to go about
> escaping certain commas in the text (and distinguishng
them from the true
> delimiter)?
In short: no. How can CF determine whether a comma is a
delimiter or
whetehr it's content? How would you expect that to work?
> I understand that putting the value in quotes works, but
that again
> relies on the enduser doing so. Is there a way to do
this upon upload or does
> the end user have no choice but to clean the file up
first.
"Garbage in: garbage out". Don't try to process something
that is not
appropriate for the task. Upload the file, parse it,
validating it as
proper CSV data (there's no official spec, but this RFC is
useful,
http://rfc.net/rfc4180.html,
and you can point your client to it). If the
file validates: process it. If it doesn't, reject it.
--
Adam