News for hackers. Stuff that matters.
Re:ASCII Delimited Text – Not CSV or TAB delimited text by gwu78 on Wednesday March 26, 2014 @11:02PM (#7478314)
Why not use the non-printing char as the comma instead of the record separator.

1. Replace all the commas in the text with the unique non-printing char before converting to CSV.

2. Convert this char back to a comma when processing the CSV for output to be read by humans.

Because commas in text are usually followed by a space, the CSV may still even be readable when using the non-printing char.

I must admit I've never understood why others view CSV as so troublesome vis-a-vis other popular formats.

in: sed 's/,/%2c/g' out: sed 's/%2c/,/g'

I guess I need someone to give me a really hairy dataset for me to understand the depth of the problem with CSV.

Meanwhile, I love CSV for its simplicity.

Re:ASCII Delimited Text – Not CSV or TAB delimited text by dbro on Thursday March 27, 2014 @05:28AM (#7479341)
that's exactly what https://github.com/dbro/csvquote does for commas and newlines both.
Re:ASCII Delimited Text – Not CSV or TAB delimited text by gwu78 on Thursday March 27, 2014 @09:22PM (#7484692)
Why use this instead of sed, awk, flex, lua, etc.?

sed does the job and on almost all UNIX clones it never needs to be installed.

Because it's already there.