Re:how to completely own an airline in 3 easy steps
by Someone on Friday January 20, 2023 @03:39AM
(#34450475)
* * *
[ Parent
| on HN ]
Re:how to completely own an airline in 3 easy steps
by Dylan16807 on Friday January 20, 2023 @04:05AM
(#34450611)
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.
Re:how to completely own an airline in 3 easy steps
by Someone on Friday January 20, 2023 @07:14AM
(#34452019)
It’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?
Re:how to completely own an airline in 3 easy steps
by forgetbook on Friday January 20, 2023 @02:09PM
(#34458134)
Yes? What do I not know that makes this question harder than it seems to me?
Re:how to completely own an airline in 3 easy steps
by Dylan16807 on Friday January 20, 2023 @02:49PM
(#34458769)
> 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.
Re:how to completely own an airline in 3 easy steps
by aardshark on Friday January 20, 2023 @10:20AM
(#34454261)
Every field is quoted. Every field is quote-escaped.
That's all you need.
Re:how to completely own an airline in 3 easy steps
by 95014_refugee on Friday January 20, 2023 @11:43AM
(#34455703)
There are simpler and better approaches. Fortunately for us all, IP datagrams are not JSON-encoded, for example.