4 ms·
Writing Semantic ASCII
- theamk 5y agoWhy do people want to have more non-printable characters? They have bad support in editors are are not compatible with most tools. If you are pushing to a new text-like format which needs brand new implementation in all consumers, you can do much better than unprintable characters: - CSV/JSON: like CSV, but JSON rules are used for string quoting. So for each line, you can put [] around it and parse as JSON array. It is easy to generate and parse, has no problems with newlines, and CSV compatible for many cases. - CSV/URI: like CSV, but URI escaping (%20) is used. Commas are represented as %2C, which is compatible with existing decoders. - And if you really like binary, CSV with generalized PPP escaping [0] (using 0x7d/0x7e characters) for newlines and commas. At least the entries without newlines/commas will look normal. [0] https://flylib.com/books/en/3.223.1.37/1/ https://flylib.com/books/en/3.223.1.37/1/