Delimiter-separated values
Delimited formats
Delimited formats
-----------------

Any character may be used to separate the values, but the most common delimiters are the [comma](/wiki/Comma_%28punctuation%29 "Comma (punctuation)"), [tab](/wiki/Tab_stop "Tab stop"), and [colon](/wiki/Colon_%28punctuation%29 "Colon (punctuation)").Under UNIX, the colon is the most common DSV delimiter for values that may contain whitespace. *Ibid*. The [vertical bar](/wiki/Vertical_bar "Vertical bar") (also referred to as *pipe*) and [space](/wiki/Space_%28punctuation%29 "Space (punctuation)") are also sometimes used. Column headers are sometimes included as the first line, and each subsequent line is a row of data. The lines are separated by [newlines](/wiki/Newline "Newline").

For example, the following fields in each record are delimited by commas, and each record by newlines:

```
"Date","Pupil","Grade"
"25 May","Bloggs, Fred","C"
"25 May","Doe, Jane","B"
"15 July","Bloggs, Fred","A"
"15 April","Muniz, Alvin ""Hank""","A"

```

Note the use of the [double quote](/wiki/Double_quote "Double quote") to enclose each field. This prevents the comma in the actual field value (Bloggs, Fred; Doe, Jane; etc.) from being interpreted as a field separator. This necessitates a way to "[escape](/wiki/Escape_character "Escape character")" the field wrapper itself, in this case the double quote; it is customary to double the double quotes actually contained in a field as with those surrounding "Hank". In this way, any [ASCII](/wiki/ASCII "ASCII") text including newlines can be contained in a field.

[ASCII](/wiki/ASCII "ASCII") and [Unicode](/wiki/Unicode "Unicode") include several [control characters](/wiki/Control_character "Control character") that are intended to be used as delimiters. They are: [28 for File Separator](/wiki/File_separator "File separator"), [29 for Group Separator](/wiki/Group_separator "Group separator"), [30 for Record Separator](/wiki/Record_separator "Record separator"), and [31 for Unit Separator](/wiki/Unit_separator "Unit separator"). Example of such use is [MARC 21](/wiki/MARC_standards%23MARC_21 "MARC standards#MARC 21") bibliographic data format. Use of these characters has not achieved widespread adoption; some systems have replaced their control properties with more accepted controls such as [CR/LF](/wiki/Newline "Newline") and TAB.


Why is it necessary to enclose each field with double quotes in some delimited formats?