Bug 167107 - csv textquote import insert broken
Summary: csv textquote import insert broken
Status: RESOLVED FIXED
Alias: None
Product: calligrasheets
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Calligra Sheets (KSpread) Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-21 00:00 UTC by bruce.lilly
Modified: 2008-08-21 13:53 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
test case test2.csv (219 bytes, application/octet-stream)
2008-07-21 00:01 UTC, bruce.lilly
Details

Note You need to log in before you can comment on or make changes to this bug.
Description bruce.lilly 2008-07-21 00:00:09 UTC
Version:           1.6.5 (using KDE 3.5.9)
Installed from:    SuSE RPMs

KSpread import and insert external data from text file provide a set of options similar to other spreadsheets for handling comma (or other delimiter) separated values; one of these defines the field separator ("Delimiter" in the KSpread "Inserting Text File" dialog) and onother defines a quoting mechanism for hiding field separators which are embedded in the field data ("Textquote" (not a word in any dictionary) in the KSpread dialog).  The separator ("Delimiter") choices are common and appear to work.  The quoting mechanism provides three choices,
" (double-quote)
' (single-quote)
None (presumably to turn off the mechanism, but it instead uses the character 'N' as documented in bug 52542, which is erroneously marked as RESOLVED)
All three of these mechanisms are broken; the last is documented in the original and recently updated reports for bug 52542 (q.v.).  This bug report documents failures in the first two quoting mechanisms.  The specific failure documented in this bug report is this:

Where a pair of quoting characters does not surround a field separator (delimiter), or where the last quoting character is not followed by a separator followed by the end of the record (i.e. end of a line of text), the quoting character is in fact part of the data field and not a quoting mechanism.

A sample file will soon be attached to this bug report which illustrates failures in all three quoting options, reproducible as follows:

1. launch Kspread, select blank worksheet 
 2. place cursor in upper left cell of a sheet
 3. on the "Insert" menu, select "External Data" and "From Text File..." 
 4. open test2.csv text file 
 5. on "Inserting Text File" dialog, select the archaic name "Tabulator" for tab character delimiter, Format "Text", select any one of the 'Textquote:' options, and Start at line 1 
 6. observe data corruption, evident in dialog window even before selecting "OK" or "Cancel"

Please note that the test file can be imported flawlessly with either of the quoting options available in OpenOffice Calc version 2.4.1 (Build 2.4.1.6); it may be instructive for Kspread maintainers to try it for comparison.
Comment 1 bruce.lilly 2008-07-21 00:01:49 UTC
Created attachment 26292 [details]
test case test2.csv

test file for CSV text file import
Comment 2 Stefan Nikolaus 2008-08-21 13:53:37 UTC
Fixed in the upcoming 2.x series.