Skip Menu |

This queue is for tickets about the Text-CSV-Simple CPAN distribution.

Report information
The Basics
Id: 19472
Status: open
Priority: 0/
Queue: Text-CSV-Simple

People
Owner: Nobody in particular
Requestors: iravim [...] hotmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Text-CSV-Simple Fails when parsing through a CSV file - Correct test.txt file
Date: Wed, 24 May 2006 17:32:04 -0700
To: bug-Text-CSV-Simple [...] rt.cpan.org
From: "Ravi Mahendrakar" <iravim [...] hotmail.com>
Hello,
 
Attached to this mail is the correct test.txt file ...
 
My earlier mail is as follows:
 
I've attached the PERL script and the CSV file that I am trying to parse in into an array, but, the Text-CSV-Simple reports the following error:
 
C:\>perl Test_CSVSimple.pl
Failed on "ACTNO","EMP_ACT","AUTOMATION",,"SMALLINT","N",0,0,2,0,2,-1,"
Failed on "ADMRDEPT","DEPARTMENT","AUTOMATION",,"CHAR    ","N",1252,0,3,0,3,-1,"
Printing Array:
ACTIVE_VERSION,LIBRARIES,SYSCAT  ,,INTEGER ,N,0,0,4,0,5,-1,,,-1,,INTEGER,SYSIBM  ,,4, , ,-1,-1,0,0,,
, , ,0,-1,0,-1,-1,N,O,,,
ACTIVE_VERSION,SYSLIBRARIES,SYSIBM  ,,INTEGER ,N,0,0,4,0,5,-1,,,-1,,INTEGER,SYSIBM  ,,4, , ,-1,-1,0,
0,,, , ,0,-1,0,-1,-1,N,O,,,
AGENTS_TOP,SNAPDB,SYSCATV82,,BIGINT  ,Y,0,0,8,0,18,-1,,,-1,,BIGINT,SYSIBM  ,,8, , ,-1,-1,0,0,,, , ,0
,-1,0,-1,-1,N,O,,,
ALTERAUTH,LIBRARYAUTH,SYSCAT  ,,CHAR    ,N,1252,0,1,0,6,-1,,,-1,,CHARACTER,SYSIBM  ,,1, , ,-1,-1,125
2,0,,, , ,0,-1,0,-1,-1,N,O,,,
 
If the above is not a defect please let me know what I am doing wrong.
 
Thanks!,
- Ravi Mahendrakar.


Save time by starting a search from any Web page with the MSN Search Toolbar-FREE!

Message body is not shown because sender requested not to inline it.

Message body is not shown because sender requested not to inline it.

Subject: Re: [rt.cpan.org #19472] Text-CSV-Simple Fails when parsing through a CSV file - Correct test.txt file
Date: Thu, 25 May 2006 06:47:34 +0100
To: Ravi Mahendrakar via RT <bug-Text-CSV-Simple [...] rt.cpan.org>
From: Tony Bowden <tony [...] kasei.com>
It's difficult to tell from the data you supplied, but it looks like this is a problem in handling multi-line entries. Text::CSV::Simple currently doesn't handle those - this is a known bug, but one that is unlikely to be fixed any time soon. If this is not the problem, please try condensing this down into a much smaller test dataset. Thanks, Tony
Subject: Re: [rt.cpan.org #19472] Text-CSV-Simple Fails when parsing through a CSV file - Correct test.txt file
Date: Fri, 26 May 2006 00:08:10 -0700
To: bug-Text-CSV-Simple [...] rt.cpan.org
From: "Ravi Mahendrakar" <iravim [...] hotmail.com>

Hello Tony,

Firstly, thank you for your reply.

Attached is the condensed version of test.txt

Thanks,

Ravi

Show quoted text

From:  "Tony Bowden via RT" <bug-Text-CSV-Simple@rt.cpan.org>
Reply-To:  bug-Text-CSV-Simple@rt.cpan.org
To:  iravim@hotmail.com
Subject:  Re: [rt.cpan.org #19472] Text-CSV-Simple Fails when parsing through a CSV file - Correct test.txt file
Date:  Thu, 25 May 2006 01:48:00 -0400 (EDT)

<URL: http://rt.cpan.org/Ticket/Display.html?id=19472 >


It's difficult to tell from the data you supplied, but it looks like
this is a problem in handling multi-line entries. Text::CSV::Simple
currently doesn't handle those - this is a known bug, but one that is
unlikely to be fixed any time soon.

If this is not the problem, please try condensing this down into a much
smaller test dataset.

Thanks,

Tony



See if you've won, play MSN Search and Win

Message body is not shown because sender requested not to inline it.

Subject: Re: [rt.cpan.org #19472] Text-CSV-Simple Fails when parsing through a CSV file - Correct test.txt file
Date: Fri, 26 May 2006 08:22:24 +0100
To: Ravi Mahendrakar via RT <bug-Text-CSV-Simple [...] rt.cpan.org>
From: Tony Bowden <tony [...] kasei.com>
On Fri, May 26, 2006 at 03:08:33AM -0400, Ravi Mahendrakar via RT wrote: Show quoted text
> "TABLE_CAT","SQLSPECIALCOLUMNS","SYSIBM ",,"VARCHAR > ","Y",1252,0,128,0,8,-1,"","",-1,,"VARCHAR","SYSIBM ",,128," "," > ",-1,-1,1252,0,,," "," ",0,-1,0,-1,-1,"N","O",, > "DEPTNUMB","ORG","AUTOMATION",,"SMALLINT","N",0,0,2,0,0,-1,""TABLE_SCHEM","SQLSPECIALCOLUMNS","SYSIBM > ",,"VARCHAR ","N",1252,0,128,0,9,-1,"","",-1,,"VARCHAR","SYSIBM ",,128," > "," ",-1,-1,1252,0,,," "," ",0,-1,0,-1,-1,"N","O",,
The issue does indeed appear to be that of of newlines in the text, which Text::CSV::Simple is currently unable to handle. I can see from this data however *why* there are newlines, as they seems unnecessary, so perhaps you could pre-process the file to remove these? Thanks, Tony
Subject: Re: [rt.cpan.org #19472] Text-CSV-Simple Fails when parsing through a CSV file - Correct test.txt file
Date: Tue, 30 May 2006 00:02:03 -0700
To: bug-Text-CSV-Simple [...] rt.cpan.org
From: "Ravi Mahendrakar" <iravim [...] hotmail.com>

Hello Tony,

Could you please give me sample code on how to pre-process the file to remove the new line characters?

Thanks,

Show quoted text

From:  "Tony Bowden via RT" <bug-Text-CSV-Simple@rt.cpan.org>
Reply-To:  bug-Text-CSV-Simple@rt.cpan.org
To:  iravim@hotmail.com
Subject:  Re: [rt.cpan.org #19472] Text-CSV-Simple Fails when parsing through a CSV file - Correct test.txt file
Date:  Fri, 26 May 2006 03:22:40 -0400 (EDT)

<URL: http://rt.cpan.org/Ticket/Display.html?id=19472 >

On Fri, May 26, 2006 at 03:08:33AM -0400, Ravi Mahendrakar via RT wrote:
> "TABLE_CAT","SQLSPECIALCOLUMNS","SYSIBM  ",,"VARCHAR
> ","Y",1252,0,128,0,8,-1,"","",-1,,"VARCHAR","SYSIBM  ",,128," ","
> ",-1,-1,1252,0,,," "," ",0,-1,0,-1,-1,"N","O",,
> "DEPTNUMB","ORG","AUTOMATION",,"SMALLINT","N",0,0,2,0,0,-1,""TABLE_SCHEM","SQLSPECIALCOLUMNS","SYSIBM
>   ",,"VARCHAR ","N",1252,0,128,0,9,-1,"","",-1,,"VARCHAR","SYSIBM  ",,128,"
> "," ",-1,-1,1252,0,,," "," ",0,-1,0,-1,-1,"N","O",,

The issue does indeed appear to be that of of newlines in the text,
which Text::CSV::Simple is currently unable to handle.

I can see from this data however *why* there are newlines, as they seems
unnecessary, so perhaps you could pre-process the file to remove these?

Thanks,

Tony



With MSN Spaces email straight to your blog. Upload jokes, photos and more. It's free!