Leverage Your Data.

±quotechar, ±q

Defining which text quotation character is used in the CSV file


Quoting a text field in CSV means enclosing it with quotation characters.
Nearly always the quotation character is the ", which is understood by most CSV readers and import programs. So this should not be changed if that can be avoided.

Generally, in CSV files simple data fields containing just a word or a number do not need to be quoted, they are just separated by the delimiter character. But as soon as the data field contains text with white space, line breaks or the delimiter character itself, it has to be enclosed to make this clear.
The quotation character is the one that used for this.


±q=character ±quotechar=character

Usage Examples

csvfox infile.csv -q='
Assumes that the CSV file to read has a single quote as quotation character.
csvfox infile.csv +q=pipe outfile.csv
Reads infile.csv (with default quotation character) and writes it into outfile.csv, using a pipe ("|") character as quotation character for writing.

Technical Hint

The default quotation character is ".
Inside the data field, if a quotation character is needed, this character will be doubled. So a " inside a quoted text field will be represented as "" in a raw CSV file. No required manual action here, as this conversion will be handled automatically.
Under construction, coming soon