Issue 94700

Summary: CSV import chokes on an escaped " character
Product: Calc Reporter: tmugford <tristan>
Component: open-importAssignee: AOO issues mailing list <issues>
Status: CONFIRMED --- QA Contact:
Severity: Trivial    
Priority: P3 CC: issues, rb.henschel
Version: OOo 2.4.1Keywords: oooqa
Target Milestone: ---   
Hardware: PC   
OS: Windows Vista   
Issue Type: ENHANCEMENT Latest Confirmation in: ---
Developer Difficulty: ---
Description Flags
An example document illustrating the problem described none

Description tmugford 2008-10-06 16:52:44 UTC
When opening a CSV file in Calc (fields enclosed by '"', terminated by ',' and 
escaped by '\'), any field containing a single escaped '"' character results in 
that line and all following lines being dropped.
Comment 1 tmugford 2008-10-06 16:56:24 UTC
Created attachment 57032 [details]
An example document illustrating the problem described
Comment 2 Regina Henschel 2008-10-06 21:09:28 UTC
As far as I know, there exists no "escaping". You have to double the text
delimiter, if it is part of your text. Your example would look


Comment 3 tmugford 2008-10-07 11:27:11 UTC
Researching this further, it seems that there is some disagreement amongst CSV 
supporting applications as to whether '\' can be used as an escape character. 
Certainly, the application generating the CSV files that first caused me to 
notice the problem considers the backslash as a legitimate escape character. 

Given that there was no official standard prior to RFC4180, and a number of 
alternative representations have already gained widespread adoption, should OO 
not provide some level of support for these alternative representations even if 
they're not strictly correct? Failing that, perhaps a more extensive entry in 
the help files describing the problem I encountered?

Incidentally, I'm fairly certain that Office 2007 (and possibly earlier 
versions) handles the backslash escape character 'correctly'. It may be worth 
making the OO CSV import more forgiving purely for the sake of greater 
compatibility - or at least perceived compatibility - with MS Office.
Comment 4 Regina Henschel 2008-10-07 14:03:45 UTC
I change this to an enhancement request and hope you agree.

Make capable of using escape characters in import of csv (and I
add it) and txt files.
Comment 5 tmugford 2008-10-07 14:20:52 UTC
Yes, I think you're right, it is an enhancement of sorts.
Comment 6 tmugford 2008-10-27 15:48:53 UTC
It transpires that the application I was exporting the troublesome CSV file 
from, is actually following a format required by MySQL's 'LOAD DATA INFILE'.