Re: Metadata below CSV data in the same file

On Tue, 11 Nov 2014 18:28:37 +0000, Alf Eaton <eaton.alf@gmail.com>
wrote:

> I found some CSV files recently[1] which have an interesting approach
> to adding metadata: appending it at the end of the file, after a blank
> line.

Did you also know about the insane way M$ allows the separator to be
spec'd? Just saw that today in a support request for my Text::CSV_XS
https://social.technet.microsoft.com/Forums/office/en-US/ee8f0432-f7d4-4730-84f3-2814eca9c06a/csv-files-arent-delimined-when-opened?forum=excel

> This means that a parser has to skip to the end of the file to read
> the metadata, so no information about how to parse the file can go
> there, but it's still a reasonable place to put free-text
> documentation about the data (in this case it includes notes about the
> data fields, license terms, and attribution details).
> 
> It does, however, rely on the CSV parser knowing that a blank line
> means "end of the data", rather than "missing value" or something
> else, so this is perhaps another option that should be configurable in
> the CSV Dialect Description Format.
> 
> There's a discussion on StackOverflow that mentions four possible
> meanings of a blank line in CSV data:
> https://stackoverflow.com/questions/12750171/meaning-of-empty-line-in-csv-file
> 
> Alf
> 
> [1] http://apps.kew.org/herbcat/navigator.do -> run a search, then
> choose one of the options under "Download specimen records"


-- 
H.Merijn Brand  http://tux.nl   Perl Monger  http://amsterdam.pm.org/
using perl5.00307 .. 5.21   porting perl5 on HP-UX, AIX, and openSUSE
http://mirrors.develooper.com/hpux/        http://www.test-smoke.org/
http://qa.perl.org   http://www.goldmark.org/jeff/stupid-disclaimers/

Received on Thursday, 13 November 2014 08:42:00 UTC