News for hackers. Stuff that matters.
Re:The CSV Virtual Table by CRConrad on Thursday March 10, 2022 @08:21AM (#30626573)
This is gonna blow your mind: There are already ASCII (and Unicode) characters for that![1],[2] Have been since forever; the inception of the ASCII standard. So it turns out everyone has been (ab)using commas, tabs, semi-colons, newlines, carriage returns, carriage-return-and-newlines, single quotes, double quotes, quotes around every field, quotes only around text fields, etc, etc... For fifty years -- totally for nothing.

Use the data-delimiter characters actually defined in the ASCII / Unicode specifications to, you know, delimit your frigging data, and you won't have to bother about whether to quote or not to quote, nor about painstakingly "escaping" (and un-escaping) whatever characters you're (mis)using for delimiters.

Sure as Hell blew away at least my mind when I came across it.

(Not that I got to implement it at work, of course.)

___

[1]: https://en.wikipedia.org/wiki/C0_and_C1_control_codes#Field_...

[2]: https://en.wikipedia.org/wiki/Delimiter#ASCII_delimited_text

There are no comments on this comment yet.