Your problem is with how cf treats lists. The delimiter can't be present
in a value, or it will be treated as separate elements. You will need to
use a proper csv parser that allows a text qualifier ("). Have you
considered CFHTTP to read the csv into a query object? In a recent
tread, someone suggested a Java csv parser, but I don't remember which
one.

Pascal

> -----Original Message-----
> From: Brant Winter [mailto:[EMAIL PROTECTED]
> Sent: 06 September 2004 05:55
> To: CF-Talk
> Subject: RE: escaping " character
>
> Actually - I have just found the issue. I am using the listfix udf :-
> http://www.cflib.org/udf.cfm/listfix
>
>
>
> The problem is that, the string I was trying to insert actually has a
> single
> comma in the csv file:-
>
>
>
> BLEOMYCIN (BL) INJ 15,000 i.u.
>
>
>
> Is there anyway to exclude listfix from picking this up as a separate
> field
> ??
>
>
>
> My code is:
>
>
>
> <cffile action="" file="#ExpandPath('/pharma/uploads')#/Book1.csv"
>
> variable="csvData">
>
>
>
> <!--- <cfset csvData = Replace(csvData, ",,", ", ,", "ALL") > --->
>
> <cfset csvData = #listfix(csvData)#>
>
>
>
>
>
> Should I be using the commented code instead ????
>
>
>
> Thanks again
>
>
>
> ----------------------------------------------------------------
> The information transmitted is intended only for the person or entity
to
> which it is addressed and may contain confidential and/or privileged
> material. Any review, retransmission, dissemination or other use of,
or
> taking of any action in reliance upon, this information by persons or
> entities other than the intended recipient is prohibited. If you
received
> this in error, please contact the sender and delete the material from
any
> computer. It is the responsibility of the recipient to ensure that the
> onward transmission, opening or use of this message and any
attachments
> will not adversely affect its systems or data. Please carry out such
virus
> and other checks, as you consider appropriate. To the fullest extent
> allowed by law, no responsibility is accepted by Haematology &
Oncology
> Clinics of Australasia for any virus damage caused by this message.
>
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to