Kernel::System::CSV - improved

Hi, JFI, today I went into trouble for parsing CSV file by using Kernel::System::CSV. The problem is, that this module is not handling any possibilities of CSV types. So to improve this, I added support of Text::CSV as backend module for Kernel::System::CSV (availabe in upcoming 2.3.x tree). So it's still compatible to the old (only one small thing). If you have a CSV like: 1;2;3; 3;2;1; With the old module you got the following array back: my $ArrayRef = [ [1,2,3], [3,2,1], ]; But this is wrong, because the ; at the end would normally mean, that there is an empty value (for more info see rfc4180 http://tools.ietf.org/html/rfc4180) . So with the new Kernel::System::CSV you will get the following array: my $ArrayRef = [ [1,2,3,''], [3,2,1,''], ]; for this kind of CSV file. The correct CSV file would be: 1;2;3 3;2;1 (will be in future) without ending ; So take care if you use cvs files with ending ; in future and you find an empty '' at the end of the array. -Martin -- ((otrs)) :: OTRS AG :: Europaring 4 :: D - 94315 Straubing Fon: +49 (0) 9421 56818 0 :: Fax: +49 (0) 9421 56818 18 http://www.otrs.com/ :: Communication with success! Address of record: Bad Homburg Local Court: Bad Homburg, HRB 10751 Tax number: 003/240/97505 Chairman: Burchard Steinbild Chief Executive Officer: André Mindermann
participants (1)
-
Martin Edenhofer