I'm planning to fix this with https://www.oilshell.org/ !
Eliminating the need for ad hoc parsing and splitting is one of the Four Features That Justify a New Unix Shell: http://www.oilshell.org/blog/2020/10/osh-features.html
I've designed a format called QTSV (quoted TSV) which lets you embed newlines and tabs in fields. It's built on QSN (quoted string notation), which are essentially just Rust string literals:
http://www.oilshell.org/release/latest/doc/qsn.html
QSN is fully implemented, but QTSV isn't done yet. Proposal here:
https://github.com/oilshell/oil/wiki/TSV2-Proposal
However the latest Oil release actually does emit QTSV! The "pp" builtin (for pretty-print) will print a QTSV file of shell function names (procs) and their doc comments (like docstrings).
----
If you'd like this to be a reality, contact me and help out! Useful things to do:
- write a messy CSV to strict QTSV converter (it will need some flags for the heuristics, like Python's CSV library) - write a QTSV library in your language