- if (!ss_get_until (&p, ss_get_char (&p), field))
- msg (SW, _("Quoted string extends beyond end of line."));
+ int quote = ss_get_byte (&p);
+ if (!ss_get_until (&p, quote, field))
+ msg (DW, _("Quoted string extends beyond end of line."));
+ if (parser->quote_escape && ss_first (p) == quote)
+ {
+ ds_assign_substring (tmp, *field);
+ while (ss_match_byte (&p, quote))
+ {
+ struct substring ss;
+ ds_put_byte (tmp, quote);
+ if (!ss_get_until (&p, quote, &ss))
+ msg (DW, _("Quoted string extends beyond end of line."));
+ ds_put_substring (tmp, ss);
+ }
+ *field = ds_ss (tmp);
+ }
+ *last_column = *first_column + (ss_length (line) - ss_length (p));