Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.0.0

Request #19510 field escape and row terminated elements added to discoverFormat returned array
Submitted: 2012-07-18 03:04 UTC
From: greywacke Assigned:
Status: Open Package: File_CSV (version 1.0.0)
PHP Version: 5.3.13 OS: linux
Roadmaps: (Not assigned)    
Subscription  


 [2012-07-18 03:04 UTC] greywacke (Pierre du Toit)
Description: ------------ I was wondering if the array returned by the discoverFormat method of the File_CSV class could be extended by adding the line terminated and escape characters as elements… perhaps attempt discovering, and if unable to discover; or not found – return \ and \r\n as default? Test script: --------------- require_once 'File/CSV.php'; $config = File_CSV::discoverFormat(realpath('test.csv')); print_r($config); Expected result: ---------------- // example from test csv format discovery Array ( [fields] => 3 [sep] => , [quote] => " [esc] => \ [term] => \r\n ) Actual result: -------------- // current capabilities Array ( [fields] => 3 [sep] => , [quote] => " )

Comments