Skip to content

CSV v1.0 Format - Comma-Separated Values (CSV) Line-by-Line Records "The Right Way" with Spaces, Blank Lines, Comments, and More

License

Notifications You must be signed in to change notification settings

csvspecs/csv-v10

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Comma-Separated Values (CSV) Datafiles for Testing

Quotes in quotes, newlines in quotes, blank lines, comments, crlf, comma in quotes and more

Summary

simple.csv:

a,b,c
1,2,3

=>

[["a", "b", "c"],
 ["1", "2", "3"]]

utf8.csv:

a,b,c
1,2,3
4,5,ʤ

=>

[["a", "b", "c"],
 ["1", "2", "3"],
 ["4", "5", "ʤ"]]

empty.csv:

a,b,c
1,,
2,3,4

or

a,b,c
1,"",""
2,3,4

=>

[["a", "b", "c"],
 ["1", "",  "" ],
 ["2", "3", "4"]]

comma_in_quotes.csv:

first,last,address,city,zip
John,Doe,120 any st.,"Anytown, WW",08123

=>

[["first", "last", "address",     "city",        "zip"  ],
 ["John",  "Doe",  "120 any st.", "Anytown, WW", "08123"]]

newlines.csv:

a,b,c
1,2,3
"Once upon↵
a time",5,6
7,8,9

=>

[["a", "b", "c"],
 ["1", "2", "3"],
 ["Once upon\na time", "5", "6"],
 ["7", "8", "9"]]

escaped_quotes.csv:

a,b
1,"ha ""ha"" ha"
3,4

=>

[["a", "b"],
 ["1", "ha \"ha\" ha"],
 ["3", "4"]]

quotes_and_newlines.csv:

a,b
1,"ha↵
""ha""↵
ha"
3,4

=>

[["a", "b"],
 ["1", "ha\n\"ha\"\nha"],
 ["3", "4"]]

json.csv:

key,val
1,"{""type"": ""Point"", ""coordinates"": [102.0, 0.5]}"

=>

[["key", "val"],
 ["1",   "{\"type\": \"Point\", \"coordinates\": [102.0, 0.5]}"]]

About

CSV v1.0 Format - Comma-Separated Values (CSV) Line-by-Line Records "The Right Way" with Spaces, Blank Lines, Comments, and More

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages