From: Earle Martin Date: 14:06 on 18 Dec 2006 Subject: Enterprise MRM: mangled CSV output I've been given a CSV file produced by something called "Enterprise MRM"*. Every line looks something like this: "Foo","Members List Report","00003816","Somebody Incorporated23B Snibbits Building69 Foonly StreetLondonFO0 8AR+44 20 7123 4567","a couple","of other", "fields here","Report Run Time: 05 Dec 2006 at 10:53:50","Page -1 of 1","Company Name Snipped ","Enterprise MRM" Firstly, note the four totally useless fields at the end of every line. They're identical every time. Then direct your attention to the fourth field, which has a name and address with all the linebreaks removed. It's my job at the moment to parse this and turn it back into a usable address. Which means a big pile of munging code filled with special case exceptions (international address formats, anyone?). No, they can't give us the data in any other format. HATE. HATE. HATE. * http://www.enterprisemrm.com/: "Membership, Charity, Golf, Leisure, Retail and Schools software. Fully integrated with Sage and Pegasus Accounts."
From: Ricardo SIGNES Date: 14:25 on 18 Dec 2006 Subject: Re: Enterprise MRM: mangled CSV output * Earle Martin <hates-software@xxxxxxxx.xxx> [2006-12-18T09:06:34] > "Foo","Members List Report","00003816","Somebody Incorporated23B > Snibbits Building69 Foonly StreetLondonFO0 8AR+44 20 7123 4567","a > couple","of other", "fields here","Report Run Time: 05 Dec 2006 at > 10:53:50","Page -1 of 1","Company Name Snipped ","Enterprise MRM" At a former job, we had a customer who demanded CSV manifests of all our shipments. They had multiple business units, each of whom used a slightly different spec for the output. The output spec would change from time to time, too, and there was no revision number. If they re-ordered an old part, the order would include the old format spec. It was a crapshoot whether they actually wanted the old spec. Changes included things like, "change date from YYMMDD to MMDDYY." I'm sure that whatever they loaded those files into was REALLY reliable data. The real hate for me, though, with CSV isn't asinine customers, but CSV itself. People say "a CSV" file as if that were a reference to some well-understood format. No two things seem to agree on whether a set of values can include commas, newlines, escaped quotes, or what. Oh, and how do you escape quotes? \" or "" or something even stupider? Also, check out this awesome comment found via Google: As is the case with most exchange formats since XML, CSV files have become somewhat of a legacy format.
From: Earle Martin Date: 14:36 on 18 Dec 2006 Subject: Re: Enterprise MRM: mangled CSV output On 18/12/06, Ricardo SIGNES <rjbs-hates@xxxxx.xxxxxxx.xxx> wrote: > The real hate for me, though, with CSV isn't asinine customers, but CSV itself. > People say "a CSV" file as if that were a reference to some well-understood > format. No two things seem to agree on whether a set of values can include > commas, newlines, escaped quotes, or what. Oh, and how do you escape quotes? > \" or "" or something even stupider? Try opening a tab-separated file with Excel when the file name ends in ".csv" (a hate in itself. Yet I never see ".tsv" files). Splat! A big pile of shit all over your screen. The work-around is to highlight the first column and choose "Data -> Cells from Text" (paraphrased) or something idiotic like that. I could have sworn that there used to be an "import" menu item that gave you a dialog box to select separator, etc., but I'm buggered if I can find it these days. Thankfully I leave that to the Windows users; OOo Calc does the right thing for me. For once.
From: Tony Finch Date: 16:11 on 18 Dec 2006 Subject: Re: Enterprise MRM: mangled CSV output On Mon, 18 Dec 2006, Ricardo SIGNES wrote: > > The real hate for me, though, with CSV isn't asinine customers, but CSV itself. http://www.creativyst.com/Doc/Articles/CSV/CSV01.htm Tony.
From: Earle Martin Date: 16:59 on 18 Dec 2006 Subject: Re: Enterprise MRM: mangled CSV output On 18/12/06, Tony Finch <dot@xxxxx.xx> wrote: > http://www.creativyst.com/Doc/Articles/CSV/CSV01.htm Which leads to: http://www.creativyst.com/Doc/Std/ctx/ctx.htm Aren't SQL dumps good enough for some people? Do we have to be subjected to yet another poorly-thought-out, little-used custom text format? Hate.
Generated at 10:26 on 16 Apr 2008 by mariachi