• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How to parse CSV
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: How to parse CSV
      • From: "Mark J. Reed" <email@hidden>
References: 
 >How to parse CSV (From: Benedikt Quirmbach <email@hidden>)
 >Re: How to parse CSV (From: Skeeve <email@hidden>)
 >Re: How to parse CSV (From: T&B <email@hidden>)

  • Prev by Date: Re: How to parse CSV
  • Next by Date: Re: How to parse CSV
  • Previous by thread: Re: How to parse CSV
  • Next by thread: Re: How to parse CSV
  • Index(es):
    • Date
    • Thread