A few notes on using escape characters may help troubleshoot any issues when using them:
- The escape character takes effect only if it is inside a quoted string. Consider this example:
He said \"Who is that?\" when she entered the room.
The first \ is treated as a regular character, and not as an escape character, because it is not inside a quoted string, and the first " is treated as the beginning of a string. Because there is an opening quote but no corresponding closing quote on the line, the parser will either complain, or will scan subsequent lines until it finds a quote that can be treated as a quote (rather than as a literal). The parser will treat everything up to that point as one data field with embedded newlines.
To correct this, enclose the entire string in quotes as in this example:
"He said \"Who is that?\" when she entered the room."
- If an explicit quote character (-q) is specified, and no explicit escape character (-e) is specified, then the escape character will be set to be the same as the quote character specified.