|
|
|
|
|
by bitmedley
1511 days ago
|
|
> Tab separated is a bit better than CSV. But can’t store tabs and still has issues with line endings, encodings etc. There are three main variations of tab-separated-values files:
1) Those that don't allow tab and line endings.
2) Those that replace tab and newline characters with escaped values (\n for newline, \t for tab, \r for carriage return, \\ for backslash).
3) Those that follow the CSV convention of quoting fields as defined in RFC4180 The third option is by far the best and is what Microsoft Excel uses. Microsoft Excel has a save file type called "Unicode Text (.txt)" which saves the data as a tab-separated file using RFC4180 quoting/escaping with the UTF-16LE character encoding. In older versions of Excel, "Unicode Text (.txt)" was the only way to export any values containing Unicode characters since the "CSV (Comma delimited) (.csv)" export format uses the ANSI encoding(Windows-1252 on Western/US computers) corrupting any characters not contained in the ANSI character set. In late 2016, Microsoft finally added the "CSV UTF-8 (Comma delimited) (.csv)" option for exporting a CSV file containing Unicode characters. https://en.wikipedia.org/wiki/Tab-separated_values |
|