±quotechar, ±q
Defining which text quotation character is used in the CSV file
Description
Quoting a text field in CSV means enclosing it with quotation characters.
Nearly always the quotation character is the
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 between quotation characters to make this clear.
The quotation character you can configure here is the one that used for this.
Pattern
Depending on the operating system and the command line or shell, it may be difficult to enter a single or double quote character directly.
For denoting the desired quote char, you can therefore also denote the single-quote
The double-quote
If you want to omit quoting completely, use the value "none".
(There are a lot of other names for special or control characters, the full list is still to be documented.)
Usage Examples
- csvfox infile.csv +q='
- Assumes that the CSV file to read has single-quotes as quotation characters.
- csvfox infile.csv +q=double
- Assumes that the CSV file to read has double-quotes as quotation characters.
- 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. (OK, that's just an example.)
Technical Hint
The default quotation character isInside the data field, if a quotation character is needed, this character will be doubled. So a