• 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: Skeeve <email@hidden>
  • Date: Mon, 21 Jan 2008 13:41:43 +0100

Benedikt Quirmbach wrote:
What I need:
0. A reliable way to get the data from you customers. CSV isn't a format, CSV is a diseaese

There are several flaws in the design of CSV
1. CSV has no design. It is an ad-hoc "format"
2. How to handle texts?
  a) surround with "
  b) surround with '
  c) don't surround
3) How to handle " and '
  a) double them
  b) escape with \
4) How to handle the field seperator
  a) Forbid in texts
  b) Text MUST be surrounded by " or '
5) How to handle numbers
  a) . or
  b) , as decimal seperator
  c) If , what is the field seperator?
6) How to handle dates
  a) American notation?
  b) ISO notation
  c) "German" notation
7) Which charset to use
8) Which linefeed to use

And I'm sure this is not everything about it...

Usually CSV/TSV is okay if you get the data in a consistant format from ALL your customers. Otherwise it's a nightmare.

Switch to something more reliable like
a) XML
b) SLK (or SYLK)

Having said that, you might either take the SMILE-approach or lets discuss (off the list in german) how to utilize perl for this. ;-)

-- Skeeve

_______________________________________________
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: T&B <email@hidden>
    • Re: How to parse CSV
      • From: KOENIG Yvan <email@hidden>
References: 
 >How to parse CSV (From: Benedikt Quirmbach <email@hidden>)

  • Prev by Date: Re: How to parse CSV
  • Next by Date: Choose from List & Return Item Number
  • Previous by thread: Re: How to parse CSV
  • Next by thread: Re: How to parse CSV
  • Index(es):
    • Date
    • Thread