To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=80385
------- Additional comments from [EMAIL PROTECTED] Wed Aug 8 12:51:57 +0000
2007 -------
>From RFC4180:
6. Fields containing line breaks (CRLF), *double quotes*, and commas
should be enclosed in double-quotes.
7. If double-quotes are used to enclose fields, then a double-quote
appearing inside a field must be escaped by preceding it with
another double quote.
Therefore, you CAN'T MIX QUOTES as TEXT-Delimiters AND as unescaped QUOTES,
like in:
...,"this is enclosed in quotes" BUT "THIS IS NOT",...
A. So, applying these rules, something like: d"a"c, or "abc"de"f" is ILLEGAL and
undefined. [When selecting '"' as a TEXT-Delimiter.]
B. IF the user selects TO USE '"' AS THE TEXT DELIMITER, then he acknowledges
that every occurrence of '"' that is NOT escaped is actually a FIELD-Quote.
Otherwise, he (and the application saving this) would have escaped it properly.
Therefore, IF you really want:
d"a"c
then code it properly:
"d""a""c"
Otherwise, TREAT ALL QUOTES AS STRINGS. You have the option to select this in
the import dialog.
My handling of the error
========================
IF such a broken csv-file is encountered, and the user insists on '"' as the
TEXT-Delimiter, then:
EVERY occurrence of '"' that is NOT escaped SHALL be considered
as a TEXT-Delimiter;
the USER opted for this, so you can't just consider some of them are
TEXT-delimiters, some are NOT - this is INCONSISTENT!
Therefore,
d"a"c becomes really
dac
Similarly,
"abcdef"test"abc" becomes
abcdeftestabc
This is consistent!
Else, how should this be handled:
,"abc" d "ef",
IS the FIELD actually:
1. 'abc" d "ef' AND the application forgot to double the QUOTES
(valid assumption)
2. 'abc d ef' - my view - CONSISTENT HANDLING
3. 'abc d "ef"' - your view - the least consistent of these 4 methods
4. "abc" d "ef" - NO ESCAPING QUOTES at all, application does NOT use them
(valid assumption, but user has the freedom to select NOT to use them)
---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]