Internet-Draft CCSV June 2024
Rankin Expires 20 December 2024 [Page]
Workgroup:
Network Working Group
Internet-Draft:
draft-rankin-ccsv-latest
Published:
Intended Status:
Informational
Expires:
Author:
M. Rankin
ICF International, Inc.

Common Format and Media Type for Control-Character-Separated Values (CCSV) Files

Abstract

This document documents the format used for Control-Character-Separated Values (CCSV) files and registers the associated MIME type "text/ccsv".

About This Document

This note is to be removed before publishing as an RFC.

The latest revision of this draft can be found at https://oldgrognard.github.io/ccsv-id/draft-rankin-ccsv.html. Status information for this document may be found at https://datatracker.ietf.org/doc/draft-rankin-ccsv/.

Source for this draft and an issue tracker can be found at https://github.com/oldgrognard/ccsv-id.

Status of This Memo

This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.

Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.

Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."

This Internet-Draft will expire on 20 December 2024.

Table of Contents

1. Introduction

A CCSV (Control-Character-Separated Values file) is a file format that enables moving data between spreadsheets, statistical analysis programs, databases, and any other program that works with rectangular data. It is very similar to (CSV) Comma-Separated Values files [RFC4180], (TSV) Tab-Separated Values files, and their derivatives. Unlike those file types, the CCSV minimizes usage ambiguity by having non-printable characters as delimiters. The two delimiter characters may not appear in the document's text, making the practice of escaping certain characters or adding additional delimiters for certain strings unnecessary. This document seeks to define the format of Control Character Separated Values (CCSV) files and formally register the "text/ccsv" Media Type for CCSV in accordance with [RFC6838].

2. Conventions and Definitions

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.

2.1. Definition of the CCSV format

In order for a file to be a CCSV, it MUST adhere to the following formatting rules:

  1. A Record Separator RS (U+001E) is used between each record in the file including the header.

  2. A Unit Separator US (U+001F) is used between each field in a record.

  3. A CCSV MUST begin with a header. The header consists of the names of the columns separated with US (U+001F) entities.

  4. The header is terminated with the RS (U+001E) entity if the document contains any records.

  5. The header and each record MUST contain the same number of US (U+001F) entities i.e., the header and each record MUST have the same number of fields.

  6. Each record in the body is delimited with a RS (U+001E) entity. Note that carriage returns and line feeds are not part of the delimiter and are valid characters in the body of a field.

  7. Each field within a record is delimited with the US (U+001F) entity.

  8. The US (U+001F) entity and the RS (U+001E) separator MUST NOT appear in the body of a field.

The ABNF grammar [STD68] appears as follows:

file = header RS *(record RS) [record]
header = name *( US name )
record = field *( US field )
name = field
field = *VCHAR
VCHAR = %x21-7E ; visible characters
RS = %x1E ; record separator
US = %x1F ; unit separator

3. Encoding Considerations

4. Security Considerations

TODO Security

5. IANA Considerations

This section provides the media-type registration application (as per [RFC6838]).

Type name: text

Subtype name: ccsv

Required parameters: N/A

Optional parameters: N/A

Encoding considerations: utf-8

Security considerations:

Interoperability considerations:

Published specification: TBD

Applications that use this media type:

Fragment identifier considerations: N/A

Additional information:

    Deprecated alias names for this type: N/A
    Magic number(s): N/A
    File extension(s): CCSV
    Macintosh file type code(s): TEXT

Person & email address to contact for further information:

Intended usage: COMMON

Restrictions on usage: N/A

Author: Mike Rankin

Change controller:

Provisional registration?

6. Normative References

[RFC2119]
Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, , <https://www.rfc-editor.org/rfc/rfc2119>.
[RFC4180]
Shafranovich, Y., "Common Format and MIME Type for Comma-Separated Values (CSV) Files", RFC 4180, DOI 10.17487/RFC4180, , <https://www.rfc-editor.org/rfc/rfc4180>.
[RFC6838]
Freed, N., Klensin, J., and T. Hansen, "Media Type Specifications and Registration Procedures", BCP 13, RFC 6838, DOI 10.17487/RFC6838, , <https://www.rfc-editor.org/rfc/rfc6838>.
[RFC8174]
Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, , <https://www.rfc-editor.org/rfc/rfc8174>.
[STD68]
Internet Standard 68, <https://www.rfc-editor.org/info/std68>.
At the time of writing, this STD comprises the following:
Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax Specifications: ABNF", STD 68, RFC 5234, DOI 10.17487/RFC5234, , <https://www.rfc-editor.org/info/rfc5234>.

Acknowledgments

TODO acknowledge.

Author's Address

Mike Rankin
ICF International, Inc.