CSVfox
Leverage Your Data.

-forcequote, -f

Defining whether CSV data fields will have to be enclosed in quotation characters

Description

Generally, in CSV files simple data fields containing just a word or a number do not need to be enclosed in quote characters ±quotechar, they are just separated by the delimiter character ±delimiter. 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.
Some programs however work better if all data fields are enclosed. Others will misinterpret the text quote character as part of the field content, so it must be generally omitted.

This command can force enclosing each and every data field with the quotation character (which is mostly a double quote "), or it will inhibit any text quoting, if required.

As a parameter for its setting "y", "yes", "true", or "1" will be accepted, as well as "n", "no", "false", or "0". Upper/Lower case will be ignored.
The standard value is "auto".

Pattern

-f=truthvalue -forcequote=truthvalue

Usage Examples

This is an example of some standard raw CSV file lines with automatic enclosing.
Each CSV field that contains whitespace has been enclosed using the quotation character ".
City,Name,Birth,"Driver License" Rome,"Andrea Bocelli",1958,y "Los Angeles","Lieutnant Columbo",1927,y London,"Hercule Poirot",1910,- "New York","Theodoros Kojak",1922,y
csvfox infile.csv -f=Y outfile.csv
This enforces that the output CSV file has each field enclosed with the quotation character, regardless of whether it contains line breaks, whitespaces, or delimiter characters.
"City","Name","Birth","Driver License" "Rome","Andrea Bocelli","1958","y" "Los Angeles","Lieutnant Columbo","1927","y" "London","Hercule Poirot","1910","-" "New York","Theodoros Kojak","1922","y"
csvfox infile.csv -f=N outfile.csv
This enforces that the output CSV file will not enclose any field with the quotation character, regardless of whether it contains line breaks, whitespaces, or delimiter characters.
City,Name,Birth,Driver License Rome,Andrea Bocelli,1958,y Los Angeles,Lieutnant Columbo,1927,y London,Hercule Poirot,1910,- New York,Theodoros Kojak,1922,y

Hints

This command is only relevant for writing CSV output files.
It will be ignored when reading input or merge CSV files.
Under construction, coming soon