Issue 94700 - CSV import chokes on an escaped " character
Summary: CSV import chokes on an escaped " character
Alias: None
Product: Calc
Classification: Application
Component: open-import (show other issues)
Version: OOo 2.4.1
Hardware: PC Windows Vista
: P3 Trivial (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
Keywords: oooqa
Depends on:
Reported: 2008-10-06 16:52 UTC by tmugford
Modified: 2013-01-29 21:39 UTC (History)
2 users (show)

See Also:
Latest Confirmation in: ---
Developer Difficulty: ---

An example document illustrating the problem described (281 bytes, text/csv)
2008-10-06 16:56 UTC, tmugford
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
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'.