| 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 (7474 days ago) |
| Due | |
| Updated | 10/23/2005 (7322 days ago) |
| Assigned | 06/05/2005 (7462 days ago) |
| Resolved | 10/23/2005 (7322 days ago) |
| Milestone | |
| Patch | No |
State ⇒ Resolved
State ⇒ Assigned
handle it correctly.
// 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');
}
http://us3.php.net/manual/en/ref.filesystem.php#ini.auto-detect-line-endings
New Attachment: file.csv
where the problems start to show up.
State ⇒ Feedback
Priority ⇒ 2. Medium
Type ⇒ Enhancement
Summary ⇒ CSV classes don't hande Mac line breaks well
Queue ⇒ Horde Framework Packages
State ⇒ New
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...