News for hackers. Stuff that matters.
Re:All software sucks (2011) by thomasfedb on Thursday August 30, 2018 @09:37AM (#17876554)
Not standardised. Fields that contain commas, newlines, or non-ASCII chars kill puppies.
Re:All software sucks (2011) by ainar-g on Thursday August 30, 2018 @09:54AM (#17876699)
>Not standardised.

Technically there is RFC4180[1], but yeah, CSV has a lot of flavours. I remember a story about how Excel couldn't correctly open a CSV file because it had a header that had "ID" as the first field name, and Excel's file format sniffing algorithm though that it's a different format.

[1] https://tools.ietf.org/html/rfc4180

Re:All software sucks (2011) by ChrisSD on Thursday August 30, 2018 @10:00AM (#17876758)
Technically RFC4180 isn't actually a standard but perhaps the world would be better if people could agree to treat it as such. However those living in countries that use the comma as a decimal separator may disagree.

> This memo provides information for the Internet community. It does not specify an Internet standard of any kind.

Re:All software sucks (2011) by _dps on Thursday August 30, 2018 @12:56PM (#17878294)
As someone from one of those countries I've never understood this criticism of CSV. JSON doesn't let you choose your own separator either but no one levels this complaint at it. Defensively quoting values that may contain commas is easy, and nearly always a negligible cost. This really seems like a total non-issue to me and I've never understood how it has gained so much mindshare among CSV critics.
Re:All software sucks (2011) by CodesInChaos on Thursday August 30, 2018 @01:10PM (#17878481)
The problem is Excel's horrible CSV implementation, and opening the file in Excel is one of the main applications of CSV. The German version of Excel expects semicolon separated CSV, where comma serves are decimal point and the date format must also be German. I found no way to create a CSV file that opens in Excel, regardless of locale. (And there are a million other problems in Excel's CSV implementation)