[dev] Data_CSV Queries

Michael Cochrane mike@graftonhall.co.nz
Tue, 30 Jul 2002 14:39:55 +0100


The Data_CSV class has a few problems and i was wondering if there were any
prefered fixes....
First problem is exporting strings that contain the deliminater... 
 1. Should the deliminater just be striped (doesn't sound good)
 2. Should the string be double quoted (seems to be common)
 3. Should the deliminater be escaped in some way?

The second problem relates to Importing data.
When multiline data is exported by Data_CSV it looks like this:

"Name", "Address"
"Mike", "40 Seafield View Rd
Grafton
Auckland"

But the current import code stops when it gets to the end of the line, not the
end of the quote. Should this be changed or should the export be changes to
somehow escape or strip the newlines? 

FYI: I have a NAG import/export coming in about 5 mins...

- Mike :-)


-- 
Everybody is somebody else's weirdo.
signature from Siglets.com

-------------------------------------------------------------------------
This mail sent from Mike's CVS HEAD install of IMP: http://horde.org/imp/