CSV again.

Richard Gaskin ambassador at fourthworld.com
Thu Oct 15 19:34:26 EDT 2015


Mike Kerner wrote:
 > Alex, Richard, etc.
 >
 > What do we consider the latest version of the csv parser?  I think I
 > found a bug in Richard's CSV2Text code, and proposed changes, but he
 > wanted the discussion to go down over here, first.  Then I noticed
 > that csv4Text is out over here, which makes 2, I guess, a bit long in
 > the tooth.

The version referred to here as "Richard's" is the famous Tweedly algo, 
in the middle of this page:
<http://www.fourthworld.com/embassy/articles/csv-must-die.html>

Alex came up with that after a a bunch of us here had a long discussion 
about the many variants of CSV running around, and how stupidly complex 
they are to parse (see the details in that article).

Mike wrote me this afternoon letting me know that there's yet another 
exception that doesn't seem to be accounted for there:

    "value","","value"

I had thought we'd covered that in the earlier discussion, but perhaps not.

So this seems like a good time to once again bring together the best 
minds in our community (are you listening Alex Tweedly, Geoff Canyon, 
Mark Weider, Dick Kreisel, and others?) to see if we can revisit CSV 
parsing and come up with a function that can parse it into tabs 
efficiently, while taking into account all of the really stupid 
exceptions that have crept into the world since that really stupid 
format was first popularized.

When we're done I'll update the article, and add even more sarcastic 
comments about what a really dumb idea it was to have encouraged people 
to delimit text with a character so frequently appearing in text.

--
  Richard Gaskin
  Fourth World Systems
  Software Design and Development for the Desktop, Mobile, and the Web
  ____________________________________________________________________
  Ambassador at FourthWorld.com                http://www.FourthWorld.com





More information about the use-livecode mailing list