Review of Jesse Phillips's CSV Parser

Jesse Phillips jessekphillips+d at gmail.com
Mon Oct 31 18:28:07 PDT 2011


On Mon, 31 Oct 2011 19:21:02 +0200, Vladimir Panteleev wrote:

> On Fri, 28 Oct 2011 16:18:27 +0300, dsimcha <dsimcha at yahoo.com> wrote:
> 
>> Docs:
>> http://nascent.freeshell.org/programming/D/doc/phobos/std_csv.html
> 
> Checked the new docs today. If I'm reading them right, the top example
> prints:
> 
> "Fred works as a Fly and earns $4 per year"
> 
> Is this a pop culture reference I'm not catching?

No, not that I know of. Should it be? Should I go with a more 
professional like example?
 
> An idea I had the other day was to include convenience presets for the
> more common flavours of CSV formats, e.g.: csvText!CSVFormat_Excel(...)

Well if Excel actually conforms to what it claims:

http://office.microsoft.com/en-us/excel-help/excel-formatting-and-
features-that-are-not-transferred-to-other-file-formats-HP010014105.aspx?
CTT=5&origin=HP010099725#BM4

Which I doubt it does, then my parser already defaults to being able to 
read such formats. In my experience Excel sucks at CSV and follows no 
rules.

The implementation I choose as default is the most common and any other 
style is just a butchafication and likely to be unreliable, usually stems 
from "my data has commas, so I'll use colon." Which is great until the 
data also has colon. But maybe that is just my experience.


More information about the Digitalmars-d mailing list