diff options
author | Damjan Jovanovic <damjan@apache.org> | 2016-04-17 16:44:43 +0000 |
---|---|---|
committer | Damjan Jovanovic <damjan@apache.org> | 2016-04-17 16:44:43 +0000 |
commit | 60e93b8b5b6bc4220d66e95cd234a37f3c8f8fd7 (patch) | |
tree | 524b42673c7e665a1652f13410f0fe1480c3f7a9 /qadevOOo/runner | |
parent | 8d94f9e44da8f3fdf55b1d814f921cb6dbdc37a3 (diff) |
Make CSV line parsers consistent with CSV field parsers.
Our CSV field parsing algorithms treats fields starting with a quote
(immediately at the beginning of the row, or after the field delimiter) as
quoted. A quoted field ends at the corresponding closing quote, and any
remaining text between the closing quote and the next field delimeter or end
of line is appended to the text already extracted from the field, but not
processed further. Any quotes in this extra text are taken verbatim - they
do not quote anything.
Our CSV line parsers were big hacks - they essentially read and concatenate
lines until an even number of quote characters is found, and then feed this
through the CSV field parsers.
This patch rewrites the line parsers to work exactly how the field parsers
work. Text such as:
"another" ",something else
is now correctly parsed by both Calc and Base as:
[another "],[something else]
instead of breaking all further parsing.
Patch by: me
Notes
Notes:
merged as: 2049e55f507b00cf70f72706900e75d20ff3bb30
Diffstat (limited to 'qadevOOo/runner')
0 files changed, 0 insertions, 0 deletions