16 ms·
I think it's valid to argue that you shouldn't be able to put some of commas, quotes, and newlines inside fields at all. And comma versus semicolon. But that
by Dylan16807 4y ago
I think it's valid to argue that you shouldn't be able to put some of commas, quotes, and newlines inside fields at all. And comma versus semicolon.
But that doesn't extend to using backslash escapes in something that's legitimately trying to be CSV. That's someone getting confused and implementing a mix of data formats, or trying to be clever and making an extended CSV format.
- Someone 4y agoIt’s valid to argue that, but that means you can’t use CSV for many real-world data sets. That, in turn, means you almost cannot use CSV in any robust solution. Even if, today, your input doesn’t have commas, quotes or newlines, can you guarantee it won’t tomorrow, next year, etc?
- forgetbook 4y agoYes? What do I not know that makes this question harder than it seems to me?
- deleted 4y ago[deleted]
- Dylan16807 4y ago> Even if, today, your input doesn’t have commas, quotes or newlines, can you guarantee it won’t tomorrow, next year, etc? But... but those are the ones I listed as real special characters, unlike backslash. I don't understand the question.
- aardshark 4y agoEvery field is quoted. Every field is quote-escaped. That's all you need.
- 95014_refugee 4y agoThere are simpler and better approaches. Fortunately for us all, IP datagrams are not JSON-encoded, for example.