I answer myself :P

To protect the comma in a CSV string, it is in fact quite simple:
myString = '"' + myString + '"';

Romu

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Romuald
Quantin
Sent: 18 June 2008 13:35
To: Flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] protect CSV separator

Hi,

 

I'm creating a CSV file from an AIR application, the separator is a comma.

 

How can I protect a comma when I create the String? So that it is not using
as a separator, I've got some texts from the database and I might have some
to protect.

 

I tried the ASCII code, but it is printing it straight in the CSV file. I
also tried a backslash before, no success

 

Any hint?

 

Thanks

 

Romu

_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to