Rules for creating .CCSV files

Generally, one CCSV file equates to one database recordset and/or a single worksheet of a spreadsheet program.

This section documents the official format that should be followed by implementing programs:

  1. Each field is delimited by a unit separator (US) entity. For example:
data1(US)data2(US)data3
  1. Each record is delimited by an (RS) entity. Note that there are no line breaks as part of the formatting. Line breaks can appear normally as part of the data contained in the file. For example:
data1(US)data2(US)data3(RS)line2-1(US)line2-2(US)line2-3(RS)...
  1. The last record in the file should be terminated with an (EOT) entity to aid in determining complete transmission. For example:
data1(US)data2(US)data3(RS)line2-1(US)line2-2(US)line2-3(EOT)
  1. Each record must have the same number of fields. Empty fields are represented by consecutive delimiters. For example:
data1(US)(US)data3(RS)line2-1(US)line2-2(US)(EOT)
  1. An optional header line may appear as the first line of the file with the same format as normal records. This header contains names corresponding to the fields in the file and must contain the same number of fields as the rest of the records in the file. (the presence or absence of the header line should be indicated via the optional “header” parameter of this MIME type. For example:
label1(US)label2(US)label3(RS)data1(US)data2(US)data3(RS)line2-1(US)line2-2(US)line2-3(EOT)
  1. Within the header and each record, there may be one or more fields separated by unit separator (US) characters. Each line must contain the same number of fields throughout the file. Spaces and carriage returns are considered part of a field and should not be ignored. The last field in a record must not be followed by a (US) character. For example:
data1(US)data2(US)data3
  1. Separator characters ((RS),(US), and (EOT)) may not appear in the body of a field.
comments powered by Disqus