Network Working Group Y. Shafranovich Request for Comments: 4180 SolidMatrix Technologies, Inc. Category: Informational October 2005
Common Format and MIME Type for Comma-Separated Values (CSV) Files
カンマ区切り値(CSV)ファイルの共通フォーマットとMIMEタイプ
Status of This Memo
このメモのステータス
This memo provides information for the Internet community. It does not specify an Internet standard of any kind. Distribution of this memo is unlimited.
このメモはインターネットコミュニティのための情報を提供します。それはどんな種類のインターネット標準を指定しません。このメモの配布は無制限です。
Copyright Notice
著作権表示
Copyright (C) The Internet Society (2005).
著作権(C)インターネット協会(2005)。
Abstract
抽象
This RFC documents the format used for Comma-Separated Values (CSV) files and registers the associated MIME type "text/csv".
このRFCは、カンマ区切り(CSV)ファイルに使用されるフォーマットを文書化し、関連するMIMEタイプ「テキスト/ CSV」を登録します。
Table of Contents
目次
1. Introduction ....................................................2 2. Definition of the CSV Format ....................................2 3. MIME Type Registration of text/csv ..............................4 4. IANA Considerations .............................................5 5. Security Considerations .........................................5 6. Acknowledgments .................................................6 7. References ......................................................6 7.1. Normative References .......................................6 7.2. Informative References .....................................6
The comma separated values format (CSV) has been used for exchanging and converting data between various spreadsheet programs for quite some time. Surprisingly, while this format is very common, it has never been formally documented. Additionally, while the IANA MIME registration tree includes a registration for "text/tab-separated-values" type, no MIME types have ever been registered with IANA for CSV. At the same time, various programs and operating systems have begun to use different MIME types for this format. This RFC documents the format of comma separated values (CSV) files and formally registers the "text/csv" MIME type for CSV in accordance with RFC 2048 [1].
カンマ区切りフォーマット(CSV)は、かなりの時間のための様々なスプレッドシートプログラム間でデータを交換し、変換するために使用されてきました。このフォーマットは非常に一般的である一方、驚くべきことに、それが正式に文書化されていません。 IANA MIME登録ツリー「は、テキスト/タブ区切り値」タイプの登録を含みながら、また、何のMIMEタイプは、これまでCSVのためにIANAに登録されていません。同時に、各種プログラムやオペレーティングシステムでは、このフォーマットのために異なるMIMEタイプを使用し始めています。このRFCは、カンマ区切り値(CSV)ファイルの形式を文書化し、正式にRFC 2048に従って、CSVは、「テキスト/ CSV」MIMEタイプを登録する[1]。
While there are various specifications and implementations for the CSV format (for ex. [4], [5], [6] and [7]), there is no formal specification in existence, which allows for a wide variety of interpretations of CSV files. This section documents the format that seems to be followed by most implementations:
CSV形式のための様々な仕様や実装があるが(例のためには、[4]、[5]、[6]及び[7])は、CSVの解釈の多種多様を可能にする存在で正式な仕様が存在しませんファイル。このセクションでは、ほとんどの実装が続いているように見える形式を文書化:
1. Each record is located on a separate line, delimited by a line break (CRLF). For example:
1.各レコードは改行(CRLF)で区切られた、別々の行に配置されています。例えば:
aaa,bbb,ccc CRLF zzz,yyy,xxx CRLF
2. The last record in the file may or may not have an ending line break. For example:
2.ファイルの最後のレコードは、または終了改行があってもなくてもよいです。例えば:
aaa,bbb,ccc CRLF zzz,yyy,xxx
3. There maybe an optional header line appearing as the first line of the file with the same format as normal record lines. This header will contain names corresponding to the fields in the file and should contain the same number of fields as the records in the rest of the file (the presence or absence of the header line should be indicated via the optional "header" parameter of this MIME type). For example:
3.あり多分正常レコードラインと同じ形式のファイルの最初の行として表示されるオプションのヘッダ行。このヘッダーは、ファイル内のフィールドに対応する名前が含まれ、ファイルの残りのレコードは、(ヘッダ行の有無をこのオプションの「ヘッダ」パラメータを介して示さなければならないようにフィールドの同じ数を含むべきですMIMEタイプ)。例えば:
field_name,field_name,field_name CRLF aaa,bbb,ccc CRLF zzz,yyy,xxx CRLF
4. Within the header and each record, there may be one or more fields, separated by commas. Each line should contain the same number of fields throughout the file. Spaces are considered part of a field and should not be ignored. The last field in the record must not be followed by a comma. For example:
ヘッダと各レコード内4は、カンマで区切られた1つ以上のフィールドがあってもよいです。各行は、ファイル全体で同じ数のフィールドが含まれている必要があります。スペースはフィールドの一部とみなされ、無視すべきではありません。レコードの最後のフィールドは、カンマが続いてはいけません。例えば:
aaa,bbb,ccc
AAA、BBB、CCC
5. Each field may or may not be enclosed in double quotes (however some programs, such as Microsoft Excel, do not use double quotes at all). If fields are not enclosed with double quotes, then double quotes may not appear inside the fields. For example:
5.各フィールドには、または(ただし、Microsoft Excelなどの一部のプログラムは、すべての二重引用符を使用しません)、二重引用符で囲まれていてもいなくてもよいです。フィールドは二重引用符で囲まれていない場合は、二重引用符は、フィールド内に表示されない場合があります。例えば:
"aaa","bbb","ccc" CRLF zzz,yyy,xxx
6. Fields containing line breaks (CRLF), double quotes, and commas should be enclosed in double-quotes. For example:
6.改行を含むフィールド(CRLF)、二重引用符、およびコンマは、二重引用符で囲む必要があります。例えば:
"aaa","b CRLF bb","ccc" CRLF zzz,yyy,xxx
7. If double-quotes are used to enclose fields, then a double-quote appearing inside a field must be escaped by preceding it with another double quote. For example:
7.二重引用符は、フィールドを囲むために使用されている場合は、そのフィールド内で登場する二重引用符は、別の二重引用符でそれを前に付けてエスケープする必要があります。例えば:
"aaa","b""bb","ccc"
"AAA"、 "B"、 "BB"、 "CCC"
The ABNF grammar [2] appears as follows:
次のようにABNF文法は、[2]に表示されます。
file = [header CRLF] record *(CRLF record) [CRLF]
ファイル= [ヘッダCRLF]レコード*(CRLFレコード)[CRLF]
header = name *(COMMA name)
ヘッダ=名*(COMMA名)
record = field *(COMMA field)
記録=フィールド*(COMMAフィールド)
name = field
名前=フィールド
field = (escaped / non-escaped)
フィールドには、=(非エスケープ/エスケープ)
escaped = DQUOTE *(TEXTDATA / COMMA / CR / LF / 2DQUOTE) DQUOTE
エスケープ= DQUOTE *(テキストデータ/ COMMA / CR / LF / 2DQUOTE)DQUOTE
non-escaped = *TEXTDATA
非エスケープ= *テキストデータ
COMMA = %x2C
PARAGRAPH =%のX2C
CR = %x0D ;as per section 6.1 of RFC 2234 [2]
CR =%x0D; RFC 2234のセクション6.1の通り[2]
DQUOTE = %x22 ;as per section 6.1 of RFC 2234 [2]
DQUOTE =%X22; RFC 2234のセクション6.1の通り[2]
LF = %x0A ;as per section 6.1 of RFC 2234 [2]
LF =%X0A、RFC 2234のセクション6.1の通り[2]
CRLF = CR LF ;as per section 6.1 of RFC 2234 [2]
CRLF = CR LF; RFC 2234のセクション6.1の通り[2]
TEXTDATA = %x20-21 / %x23-2B / %x2D-7E
テキストデータ=%x20-21 /%x23-2B /%x2D-7E
This section provides the media-type registration application (as per RFC 2048 [1].
このセクションでは、RFC 2048の通りのメディアタイプ登録アプリケーション([1]を提供します。
To: ietf-types@iana.org
と: いえtfーtyぺs@いあな。おrg
Subject: Registration of MIME media type text/csv
件名:MIMEメディアタイプtext / csvファイルの登録
MIME media type name: text
MIMEメディアタイプ名:テキスト
MIME subtype name: csv
MIMEサブタイプ名:CSV
Required parameters: none
必須パラメータ:なし
Optional parameters: charset, header
オプションのパラメータ:文字セット、ヘッダ
Common usage of CSV is US-ASCII, but other character sets defined by IANA for the "text" tree may be used in conjunction with the "charset" parameter.
CSVの一般的な使用方法は、「文字セット」パラメータと組み合わせて使用することができる「テキスト」ツリーのためにIANAによって定義されたUS-ASCIIが、他の文字セットです。
The "header" parameter indicates the presence or absence of the header line. Valid values are "present" or "absent". Implementors choosing not to use this parameter must make their own decisions as to whether the header line is present or absent.
「ヘッダ」パラメータは、ヘッダ行の有無を示しています。有効な値は、「現在」または「不在」です。実装者は、ヘッダ行が存在するかしないかどうかについて、独自の意思決定を行う必要があり、このパラメータを使用しないことを選択します。
Encoding considerations:
エンコードの考慮事項:
As per section 4.1.1. of RFC 2046 [3], this media type uses CRLF to denote line breaks. However, implementors should be aware that some implementations may use other values.
セクション4.1.1あたりとして。 RFC 2046 [3]、このメディアタイプは、改行を表すためにCRLFを使用します。しかし、実装者は、いくつかの実装は、他の値を使用する可能性があることに注意する必要があります。
Security considerations:
セキュリティの考慮事項:
CSV files contain passive text data that should not pose any risks. However, it is possible in theory that malicious binary data may be included in order to exploit potential buffer overruns in the program processing CSV data. Additionally, private data may be shared via this format (which of course applies to any text data).
CSVファイルには、すべてのリスクをもたらすべきではない受動的なテキストデータが含まれています。しかし、それは悪質なバイナリデータは、プログラム処理CSVデータにおける潜在的なバッファオーバーランを利用するために含まれてもよいことを理論的に可能です。また、プライベートデータは、(もちろん、任意のテキストデータに適用されます)、このフォーマットを介して共有することができます。
Interoperability considerations:
相互運用性の考慮事項:
Due to lack of a single specification, there are considerable differences among implementations. Implementors should "be conservative in what you do, be liberal in what you accept from others" (RFC 793 [8]) when processing CSV files. An attempt at a common definition can be found in Section 2.
単一の仕様がないため、実装間にかなりの違いがあります。実装者は、「あなたは何をすべきかで保守的である、あなたが他の人から受け入れ何でリベラルなる」必要があります(RFC 793 [8])CSVファイルを処理するとき。共通定義の試みは、第2節で見つけることができます。
Implementations deciding not to use the optional "header" parameter must make their own decision as to whether the header is absent or present.
オプションの「ヘッダ」パラメータを使用しないように決定する実装はヘッダが存在しないか、または存在しているかどうかについて、独自の判断を下す必要があります。
Published specification:
公開された仕様:
While numerous private specifications exist for various programs and systems, there is no single "master" specification for this format. An attempt at a common definition can be found in Section 2.
数多くの民間仕様は様々なプログラムやシステムのために存在するが、この形式にはシングル「マスター」仕様ではありません。共通定義の試みは、第2節で見つけることができます。
Applications that use this media type:
このメディアタイプを使用するアプリケーション:
Spreadsheet programs and various data conversion utilities
スプレッドシートプログラムや各種データ変換ユーティリティ
Additional information:
追加情報:
Magic number(s): none
マジックナンバー(S):なし
File extension(s): CSV
ファイルの拡張子(S):CSV
Macintosh File Type Code(s): TEXT
Macintoshのファイルタイプコード(S):TEXT
Person & email address to contact for further information:
詳細のために連絡する人とEメールアドレス:
Yakov Shafranovich <ietf@shaftek.org>
ヤコブShafranovich <итф@шафтек.орг>
Intended usage: COMMON
意図している用法:COMMON
Author/Change controller: IESG
著者/変更コントローラ:IESG
The IANA has registered the MIME type "text/csv" using the application provided in Section 3 of this document.
IANAはこのドキュメントのセクション3に設けられたアプリケーションを使用して、MIMEタイプ「テキスト/ CSV」を登録しました。
See discussion above in section 3.
セクション3で上記の議論を参照してください。
The author would like to thank Dave Crocker, Martin Duerst, Joel M. Halpern, Clyde Ingram, Graham Klyne, Bruce Lilly, Chris Lilley, and members of the IESG for their helpful suggestions. A special word of thanks goes to Dave for helping with the ABNF grammar.
作者は彼らの役に立つ提案をデイブ・クロッカー、マーティンDuerst、ジョエルM.ハルパーン、クライド・イングラム、グラハムKlyne、ブルース・リリー、クリス・リレイ、およびIESGのメンバーに感謝したいと思います。感謝の特別な言葉は、ABNF文法を助けるためデイブに行きます。
The author would also like to thank Henrik Lefkowetz, Marshall Rose, and the folks at xml.resource.org for providing many of the tools used for preparing RFCs and Internet drafts.
著者はまた、RFCとインターネットドラフトを製造するために使用されるツールの多くを提供するためのヘンリクLefkowetz、マーシャルローズ、そしてxml.resource.orgの人々に感謝したいと思います。
A special thank you goes to L.T.S.
あなたはL.T.S.に行く特別な感謝
[1] Freed, N., Klensin, J., and J. Postel, "Multipurpose Internet Mail Extensions (MIME) Part Four: Registration Procedures", BCP 13, RFC 2048, November 1996.
[1]解放され、N.、Klensin、J.、およびJ.ポステル、 "多目的インターネットメール拡張(MIME)パート4:登録手順"、BCP 13、RFC 2048、1996年11月。
[2] Crocker, D. and P. Overell, "Augmented BNF for Syntax Specifications: ABNF", RFC 2234, November 1997.
[2]クロッカー、D.、およびP. Overell、 "構文仕様のための増大しているBNF:ABNF"、RFC 2234、1997年11月。
[3] Freed, N. and N. Borenstein, "Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types", RFC 2046, November 1996.
[3]フリード、N.とN. Borenstein、 "マルチパーパスインターネットメールエクステンション(MIME)パート2:メディアタイプ"、RFC 2046、1996年11月。
[4] Repici, J., "HOW-TO: The Comma Separated Value (CSV) File Format", 2004, <http://www.creativyst.com/Doc/Articles/CSV/CSV01.htm>.
[4] Repici、J.は、<http://www.creativyst.com/Doc/Articles/CSV/CSV01.htm>、2004年 "HOW-TOカンマ値(CSV)ファイル形式を区切り"。
[5] Edoceo, Inc., "CSV Standard File Format", 2004, <http://www.edoceo.com/utilis/csv-file-format.php>.
[5] Edoceo社、 "CSV標準ファイルフォーマット"、2004年、<http://www.edoceo.com/utilis/csv-file-format.php>。
[6] Rodger, R. and O. Shanaghy, "Documentation for Ricebridge CSV Manager", February 2005, <http://www.ricebridge.com/products/csvman/reference.htm>.
[6]ロジャー、R.およびO. Shanaghy、 "Ricebridge CSV Managerのドキュメント"、2005年2月、<http://www.ricebridge.com/products/csvman/reference.htm>。
[7] Raymond, E., "The Art of Unix Programming, Chapter 5", September 2003, <http://www.catb.org/~esr/writings/taoup/html/ch05s02.html>.
[7]レイモンド、E.、 "Unixのプログラミング、第5章のアート"、2003年9月、<http://www.catb.org/~esr/writings/taoup/html/ch05s02.html>を。
[8] Postel, J., "Transmission Control Protocol", STD 7, RFC 793, September 1981.
[8]ポステル、J.、 "伝送制御プロトコル"、STD 7、RFC 793、1981年9月。
Author's Address
著者のアドレス
Yakov Shafranovich SolidMatrix Technologies, Inc.
ヤコフShafranovich SolidMatrix・テクノロジーズ株式会社
EMail: ietf@shaftek.org URI: http://www.shaftek.org
電子メール:ietf@shaftek.org URI:http://www.shaftek.org
Full Copyright Statement
完全な著作権声明
Copyright (C) The Internet Society (2005).
著作権(C)インターネット協会(2005)。
This document is subject to the rights, licenses and restrictions contained in BCP 78, and except as set forth therein, the authors retain all their rights.
この文書では、BCP 78に含まれる権利と許可と制限の適用を受けており、その中の記載を除いて、作者は彼らのすべての権利を保有します。
This document and the information contained herein are provided on an "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
この文書とここに含まれている情報は、基礎とCONTRIBUTOR「そのまま」、ORGANIZATION HE / SHEが表すまたはインターネットソサエティおよびインターネット・エンジニアリング・タスク・フォース放棄すべての保証、明示または、(もしあれば)後援ISに設けられています。黙示、情報の利用は、特定の目的に対する権利または商品性または適合性の黙示の保証を侵害しない任意の保証含むがこれらに限定されません。
Intellectual Property
知的財産
The IETF takes no position regarding the validity or scope of any Intellectual Property Rights or other rights that might be claimed to pertain to the implementation or use of the technology described in this document or the extent to which any license under such rights might or might not be available; nor does it represent that it has made any independent effort to identify any such rights. Information on the procedures with respect to rights in RFC documents can be found in BCP 78 and BCP 79.
IETFは、本書またはそのような権限下で、ライセンスがたりないかもしれない程度に記載された技術の実装や使用に関係すると主張される可能性があります任意の知的財産権やその他の権利の有効性または範囲に関していかなる位置を取りません利用可能です。またそれは、それがどのような権利を確認する独自の取り組みを行ったことを示すものでもありません。 RFC文書の権利に関する手続きの情報は、BCP 78およびBCP 79に記載されています。
Copies of IPR disclosures made to the IETF Secretariat and any assurances of licenses to be made available, or the result of an attempt made to obtain a general license or permission for the use of such proprietary rights by implementers or users of this specification can be obtained from the IETF on-line IPR repository at http://www.ietf.org/ipr.
IPRの開示のコピーが利用できるようにIETF事務局とライセンスの保証に行われた、または本仕様の実装者または利用者がそのような所有権の使用のための一般的なライセンスまたは許可を取得するために作られた試みの結果を得ることができますhttp://www.ietf.org/iprのIETFのオンラインIPRリポジトリから。
The IETF invites any interested party to bring to its attention any copyrights, patents or patent applications, or other proprietary rights that may cover technology that may be required to implement this standard. Please address the information to the IETF at ietf-ipr@ietf.org.
IETFは、その注意にこの標準を実装するために必要とされる技術をカバーすることができる任意の著作権、特許または特許出願、またはその他の所有権を持ってすべての利害関係者を招待します。 ietf-ipr@ietf.orgのIETFに情報を記述してください。
Acknowledgement
謝辞
Funding for the RFC Editor function is currently provided by the Internet Society.
RFC Editor機能のための基金は現在、インターネット協会によって提供されます。