Re:Time to retire the CSV?
by dragonwriter on Wednesday August 18, 2021 @01:01PM
(#28224079)
> So someone opens this CSV in Excel and there's garbage in A1?
Yeah, that's why I chose the “thing that looks like a text file—including optionally CSV—but has additional metadata after the EOF mark” approach instead of stuffing additional metadata in the CSV; there's no way to guarantee that existing implementations will safely ignore any added metadata the main CSV body. (My mechanism has some risk in that there are probably CSV readers that treat the file as a binary byte stream and use the file size rather than a text stream that ends at EOF, but I expect its far fewer than will do the wrong thing with additional metadata before the first header.
Does this really count as compatible? You will get user bugs for this.