6.0.0-beta1
9/24/25

[#2026] CSV classes don't hande Mac line breaks well
Summary CSV classes don't hande Mac line breaks well
Queue Horde Framework Packages
Type Enhancement
State Resolved
Priority 2. Medium
Owners jan (at) horde (dot) org
Requester kevin_myer (at) iu13 (dot) org
Created 05/24/2005 (7428 days ago)
Due
Updated 10/23/2005 (7276 days ago)
Assigned 06/05/2005 (7416 days ago)
Resolved 10/23/2005 (7276 days ago)
Milestone
Patch No

History
10/23/2005 04:50:26 PM Jan Schneider Comment #7
State ⇒ Resolved
Reply to this comment
Fixed.
06/05/2005 05:41:10 PM Jan Schneider Assigned to Jan Schneider
State ⇒ Assigned
 
06/05/2005 12:53:51 AM Matt Selsky Comment #6 Reply to this comment
It does, but the forked version of File_CSV in framework doesn't 
handle it correctly.


06/04/2005 11:04:31 PM kevin_myer (at) iu13 (dot) org Comment #5 Reply to this comment
I thought File_CSV already handled this in the discoverFormat function:



// Set auto detect line ending for Mac EOL support if < PHP 4.3.0.

$phpver = version_compare('4.1.0', phpversion(), '<');

if ($phpver) {

              $oldini = ini_get('auto_detect_line_endings');

              ini_set('auto_detect_line_endings', '1');

          }
06/04/2005 09:04:38 PM Matt Selsky Comment #4 Reply to this comment
06/04/2005 04:20:38 PM kevin_myer (at) iu13 (dot) org Comment #3
New Attachment: file.csv Download
Reply to this comment
Try importing this.  Import, Step 3, where fields are matched, is 
where the problems start to show up.
05/24/2005 09:48:04 AM Jan Schneider Comment #2
State ⇒ Feedback
Reply to this comment
Please provide an example file that is causing problems for you.
05/24/2005 01:51:02 AM kevin_myer (at) iu13 (dot) org Comment #1
Priority ⇒ 2. Medium
Type ⇒ Enhancement
Summary ⇒ CSV classes don't hande Mac line breaks well
Queue ⇒ Horde Framework Packages
State ⇒ New
Reply to this comment
I'm not sure whether to classify this is a bug or an enhancment 
request.  FRAMEWORK_3 relies on File/CSV.php from PEAR, which has 
rudimentary support for Mac EOL.  HEAD implements its own File_CSV, 
which appears to be somewhat of a fork of the PEAR File/CSV.  I cannot 
get CSV files, generated on a Mac, to import properly with either 
FRAMEWORK_3 or HEAD installs.  Similar problems exists with TSV files.



The matching pairs area of the import doesn't work - no imported 
fields show up.  I'm pretty sure its choking over the Mac EOL's but 
this is a bit of a problem for us, because data we are potentially 
importing is coming out of legacy Macintosh applications (email, or 
database, both OS 9).  Even some of the Carbonized OS X apps still 
generate CR instead of LF.  Almost as bad as having to deal with Mac 
resource forks...

Saved Queries