Rules for Quoted Delimited Data Handling
Rules for Quotes
The following rules apply to both the open and close quote:
If the open quote and close quote are distinct from each other, neither can be a substring
of the other.
Neither open quote nor close quote can be a substring of the delimiter.
The delimiter cannot be a substring of either open quote or close quote.
The backslash character (\) cannot occur in either the open quote or close quote.
Rules for Parsing
If values are unquoted, scan for the delimiter or end-of-line, since these are the
only significant characters.
If values are always quoted, the following rules apply:
At the start of the input line, or after a delimiter, an open quote must be present;
otherwise, it is a malformed input line.
Following an open quote, all characters become part of the data value, with the following
exceptions:
A doubled close quote causes one close quote to become part of the data value. The
DataConnector operator supports this behavior automatically so that you do not need
to specify a quote as the EscapeQuoteDelimiter attribute.
A backslash-escaped close quote causes the escape backslash to be discarded and the
close quote to become part of the data value.
A backslash-escaped backslash causes the escape backslash to be discarded and the
second backslash to become part of the data value.
An undoubled, unescaped close quote terminates the data value, and must be immediately
followed by a delimiter or end-of-line.
If values are optionally quoted, the following rules apply:
At the start of the input line, or after a delimiter, if an open quote is present,
the value is quoted and the rules above for always-quoted values apply.
Otherwise, the value is unquoted, and the rules above for unquoted values apply.