Tab-separated values

Uses your system voice; voice and rate in settings.

Snapshot

≈ 3 min read

Names in other languages

No names in other languages are held for this entry yet.

Article bodies are English and are not machine-translated. A name in another language is not a translation of the article.

Tab-separated values (TSV) is a plain text data format for storing tabular data where the values of a record are separated by a tab character as the delimiter and each record is a line (i.e. newline is the delimiter). The TSV format is a form of delimiter-separated values (DSV) and is similar to the commonly-used comma-separated values (CSV) format. TSV is a relatively simple format and is widely supported for data exchange by software that generally deals with tabular data. For example, a TSV file might be used to transfer information from a database to a spreadsheet.

Tab-separated values (TSV) is a plain text data format for storing tabular data where the values of a record are separated by a tab character as the delimiter and each record is a line (i.e. newline is the delimiter). The TSV format is a form of delimiter-separated values (DSV) and is similar to the commonly-used comma-separated values (CSV) format. TSV is a relatively simple format and is widely supported for data exchange by software that generally deals with tabular data. For example, a TSV file might be used to transfer information from a database to a spreadsheet.

Delimiter collision

As a form of delimiter collision, if a field (record value) contained a tab character, the data format would become meaningless since tabs were no longer only used between fields. To prevent this situation, the IANA media type standard for TSV simply disallows a tab within a field. Similarly, a value cannot contain a line terminator. To represent a value with an embedded tab or line terminator character, a commonly-used mechanism is to replace the character with the corresponding escape sequence as shown in the following table. Another commonly-used convention, borrowed from CSV ( ), is to enclose a value that contains a tab or line terminator character in quotes. Among others it's used by LibreOffice Calc where the backslash (\) notation is not implemented and TSV is simply treated as a variant of CSV with tab delimiters instead of comma.

Line terminator

As for any text file, the character(s) used for line terminator varies. On a Microsoft-based system, normally it's a carriage return (CR) and line feed (LF) sequence. On a Unix-based system, it's just LF. The de-facto specification uses the term "EOL" which is an ambiguous term like line terminator and newline. Software often is designed to either handle the line terminator for the platform on which it runs or to handle either terminator.

Text derived from https://en.wikipedia.org/w/index.php?oldid=1371990650 under CC BY-SA 4.0; modifications have been made.

Sources cited in this revision

Extracted from the cited revision's reference blocks; absent citations are not invented.