4 ms·
If you're manually generating your own CSV files, you probably know what kind of data you are generating and consequently whether your data is going to contain
by astine 5y ago
If you're manually generating your own CSV files, you probably know what kind of data you are generating and consequently whether your data is going to contain commas. If commas and newlines don't exist in your data, then you can safely ignore quoting rules when generating CSV files. I know that I've generated CSVs in the past and rather than figuring out the correct way to quote the strings, I just removed any inconvenient characters without any loss to the data at all. Obviously this is not "correct" but you don't have to implement cases if you know they won't show up.
- politician 5y agoYou use the right ANSI characters - the record and field separators (30,31) - and avoid hacks like comma, pipe, and newline.