Is it possible to just use some random character, maybe even from different charset, to act as delimiter for importing/exporting tabular data?
Is it possible to just use some random character, maybe even from different charset, to act as delimiter for importing/exporting tabular data?
In fact, the Microsoft version of CSV is a textbook example of how not to design a textual file format. Its problems begin with the case in which the separator character (in this case, a comma) is found inside a field. The Unix way would be to simply escape the separator with a backslash, and have a double escape represent a literal backslash. This design gives us a single special case (the escape character) to check for when parsing the file, and only a single action when the escape is found (treat the following character as a literal). The latter conveniently not only handles the separator character, but gives us a way to handle the escape character and newlines for free. CSV, on the other hand, encloses the entire field in double quotes if it contains the separator. If the field contains double quotes, it must also be enclosed in double quotes, and the individual double quotes in the field must themselves be repeated twice to indicate that they don't end the field.
The bad results of proliferating special cases are twofold. First, the complexity of the parser (and its vulnerability to bugs) is increased. Second, because the format rules are complex and underspecified, different implementations diverge in their handling of edge cases. Sometimes continuation lines are supported, by starting the last field of the line with an unterminated double quote — but only in some products! Microsoft has incompatible versions of CSV files between its own applications, and in some cases between different versions of the same application (Excel being the obvious example here).
But even if they did, you still always need to handle the case where one might legitimately want to use the delimiter character inside a field value.
Using xlsx rules out vim of course, and much as I'm a fan of vim I think it's plain foolishness to endorse it as a spreadsheet program. Vim is fine for ad-hoc viewing and quick-and-dirty edits, especially if the file is full of numbers and uncomplicated text, but it's really easy to break a csv that has fancy escaping in it.
About exporting using random characters, I have found that ~ (tilde) is almost never seen in actual data, hence it can be used as a field separator in most cases. Another safe choice is the | (pipe) symbol. (In Windows, you can change the field separator in the "Region Settings" - a rather weird place to have that setting.)