Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^2: Text::CSV on Unicode file

by dd-b (Monk)
on Jun 07, 2017 at 23:46 UTC ( [id://1192313] : note . print w/replies, xml ) Need Help??


in reply to Re: Text::CSV on Unicode file
in thread Text::CSV on Unicode file

Okay, something is weirdly amiss. The error still occurs with only one data line (which looks well-behaved to me) and the header line modified to give names to fields previously empty (so I didn't change the number of commas, but put something between the ones that had nothing there).

"Volume.label","Volume.serialno","Volume.vtype","Volume.netname","Volu +me.filesystem","Path.name","other.nothing","Thumbnail.checksum","Thum +bnail.width","Thumbnail.height","Thumbnail.horiz_res","Thumbnail.vert +_res","Thumbnail.colortype","Thumbnail.colordepth","Thumbnail.gamma", +"Thumbnail.thumbnail_width","Thumbnail.thumbnail_height","Thumbnail.t +humbnail_type","Thumbnail.thumbnail_size","Thumbnail.name","Thumbnail +.metric1","Keywords.pkeywords","nothing.nothing" PCD0138,,4037894171,5,\\ddb\r$,CDFS,PHOTO_CD\IMAGES,1,0,0,"1996-09-30T +21:38:57","2002-10-12T00:29:25",3368960,2147483648,512,768,0,0,0,24,0 +,68,100,518,336,IMG0002.PCD,m0000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000,b00000000000000000000000000000000,,0,";",lose
My code remains the same as the original post, and the error message remains precisely the same. Here's the output, along with a bit more info about the file:
ddb@DDB4 /cygdrive/p/work/tpdbfix/app $ ./readtpexport.pl play-thumbs.txt play-thumbs.txt Point a Strings with code points over 0xFF may not be mapped into in-memory fi +le handles readline() on closed filehandle $h at /usr/lib/perl5/site_perl/5.22/i6 +86-cygwin-threads-64int/Text/CSV_XS.pm line 830. at ./readtpexport.pl line 25. ddb@DDB4 /cygdrive/p/work/tpdbfix/app $ file play-thumbs.txt play-thumbs.txt: UTF-8 Unicode (with BOM) text, with very long lines ddb@DDB4 /cygdrive/p/work/tpdbfix/app $ ls -l play-thumbs.txt -rwxrwxr-x 1 ddb Unix_Group+1001 874 Jun 7 18:41 play-thumbs.txt

Replies are listed 'Best First'.
Re^3: Text::CSV on Unicode file
by Tux (Canon) on Jun 09, 2017 at 06:20 UTC

    Can you make those two lines of CSV available in a .tgz or a .zip somewhere? I cannot reproduce this on my Linuxes, whatever I try

    Feel free to make this an issue on Text::CSV_XS' issues. Even if it is cygwin related, this should not happen.


    Enjoy, Have FUN! H.Merijn