2
FPAT = "([^,]*)|(\"([^\"]|\"\")+\")"
3
OFS = "\t" # Print tab-separated values
7
for (i = 1; i <= NF; i++) {
8
# Extract data from double-quoted fields
9
if (substr($i, 1, 1) == "\"") {
10
gsub(/^"|"$/, "", $i) # Remove enclosing quotes
11
gsub(/""/, "\"", $i) # Convert "" to "
14
$1 = $1 # force rebuild of the record