News for hackers. Stuff that matters.
Re:So you want to write your own CSV code (2014) by cryptonector on Friday May 15, 2020 @03:24PM (#23196292)
ASCII FS/RS/GS/US do not have a visual representation, and users do not know how to enter them. That means they're essentially for binary-like encodings -- they're not really text if users can't see or enter them easily.

But users can see the commas in CSV, and they can trivially enter them. Yeah, the result is messy.

The lesson here is that the separator control characters should have been visual and had a visual indicator on keyboard keycaps to indicate how to enter them. Because they aren't and didn't, they are essentially useless for text.

EDIT: I do happen to know how to enter these on *nix systems. The ascii(7) man page tells you how:

       034   28    1C    FS  (file separator)        134   92    5C    \  '\\'
       035   29    1D    GS  (group separator)       135   93    5D    ]
       036   30    1E    RS  (record separator)      136   94    5E    ^
       037   31    1F    US  (unit separator)        137   95    5F    _
so FS is ^\ (which you have to be careful does not cause the tty to generate SIGQUIT -- you have to ^V^\), ^], ^^, and ^_. That is, <control>\, <control>], <control>^, and <control><shift>-. On U.S. keyboards anyways.

There are no comments on this comment yet.