Re: Fils_CSV patch
| From: | Wolfram Kriesing | Date: | Sat, 18 Oct 2003 00:04:40 +0000 |
| Subject: | Re: Fils_CSV patch | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-22780@lists.php.net to get a copy of this message | ||
Paul M Jones wrote:
On Friday, Oct 17, 2003, at 15:22 US/Central, Wolfram Kriesing wrote:Hi Paul, i think the idea of passing a string should be integrated too, but i would suggest to go another way. The problem with returning all the rows in one array is that huge files (like i am currently working on, with i.e. 500.000 lines) would take up too much memory, and that would not be feasible. Could you rewrite the patch to also work on a string but reading it char by char, since that seems the better alternative, i think. What do you think? One way to solve that would be to wrap the char-by-char reading into an abstract method/class. But that would be bloat i think, are there any better suggestions? -- Wolfram http://opensource.visionp.de ... authentication system .... http://sf.net/projects/authi got a patch for the File/CSV.php. It enables reading files of differing number of columns on each line, which sometimes happens when you get some "ugly" data ... I added a comment to show how to use this feature. If you want me to commit it i can do it, otherwise feel free to apply the patch.And while we're at it... I submitted this additional method for File_CSV a few months ago, but haven't seen it in any new packages for File_CSV. It parses a string variable according to the File_CSV readQuoted() rules (instead of parsing a file); this is useful, for example, when CSV-formatted data is stored in a table. See the attached file; if you could include it in the next File_CSV package, that'd be real nice. :-)