Re: How to parse CSV
Re: How to parse CSV
- Subject: Re: How to parse CSV
- From: "Mark J. Reed" <email@hidden>
- Date: Mon, 21 Jan 2008 19:38:28 -0500
On Jan 21, 2008 6:41 PM, T&B <email@hidden> wrote:
> > 1. CSV has no design. It is an ad-hoc "format"
>
> I think that's a bit harsh
Harsh or not, it's true. It wasn't so much designed as grown, and
different applications have different ideas of what "CSV" means.
> I've always found CSV to use:
> "," between items on the same row
That's safe, since it's right there in the name. :)
> new line (return or linefeed) to start a new row
And already we have to worry about divergence: CR, LF, or CRLF?
> quotes (") around items that contain a comma or new line
Sometimes newlines are allowed inside quotes, sometimes not.
> "" to escape a quote within quotes
This is probably the most likely feature to be different between a
pair of applications. Some use "here's a section with ""quoted
quotes""", others use "here's a section with \"quoted quotes\""...
> "." in decimals
or "whatever the writing application's internationalization prefs were
set to at the time"...
...
--
Mark J. Reed <email@hidden>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden