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 11:14:36 +0000
2007 -------
Sir,
Here is what I have observed regarding string fields in CSV files in Calc (and
Excel, for that matter):
- A field is considered a delimited string ONLY IF there is a quote
IMMEDIATELY after a field separator.
- Leading and trailing space in a field IS SIGNIFICANT. This means
that if a field begins with a space and then a quote, it is not
interpreted as a string, but is stored as is.
- A delimited string may continue with other data (that may contain
quotes) until the end of a field is reached. This subsequent data
is stored AS IS, i.e. no quote translation.
- As a result of the preceding point, ONLY THE FIRST PROPERLY QUOTED
STRING IS RECOGNISED AND TRANSLATED.
According to the rules I described above, here is how the fields in test case 3
would have been read in.
1. |test| , |->"a"<-b| , | "a"| , | d"a"c | , | m | , | "j" | , |d| ,
|b"A"| , |D"E| , |->"f,1"<-| , |->"a,b"<-| , |->"de"<-b| , |a"|
2. |->"abcdef"<- test "abc"| , |->"def"<-g"h"| , |def"gh"|
3. |->"this is
a test"<-| , |->"yes
it
works"<-| , ||
4. |No it doesn't|
5. |->"yes it,"","<-does"| , |->"no"<-|
6. |->""""<-a| , |cd""e|
7. |->"a""b"""<-|
This is consistent with how Excel reads in the file.
Whilst I appreciate your attempt at explaining how Calc reads in the file, I
must disagree with it because you interpret strings wherever they occur in a
field, whereas Calc interprets the first 4 lines of test case 1 in the exact
same way as I described above. Therefore, I assumed its behaviour would be
consistent throughout the file.
And in response to your statements that my CSV file is "broken", it may be that
it is so, but let me quote some of what is written under "Interoperability
considerations" in RFC 4180:
"Due to lack of a single specification, there are considerable
differences among implementations. Implementors should "be
conservative in what you do, be liberal in what you accept from
others" (RFC 793 [8]) when processing CSV files."
---------------------------------------------------------------------
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]