Just for drill, I copied the script and the small test file to a different system to see if the problem reproduces.

It does; original environment is Cygwin, which I think anybody familiar with it is always just a *little* suspicious of, but copying the two test files to a FreeBSD box, the problem reproduces exactly.

[ddb@playpen ~/smbshare/Documents/work/tpdbfix/app]$ cpan -D Text::CSV +_XS Loading internal null logger. Install Log::Log4perl for logging messag +es Reading '/home/ddb/.cpan/Metadata' Database was generated on Wed, 07 Jun 2017 21:41:02 GMT Text::CSV_XS ---------------------------------------------------------------------- +--- (no description) H/HM/HMBRAND/Text-CSV_XS-1.29.tgz /usr/local/lib/perl5/site_perl/mach/5.24/Text/CSV_XS.pm Installed: 1.29 CPAN: 1.29 up to date H.Merijn Brand (HMBRAND) h.m.brand@xs4all.nl [ddb@playpen ~/smbshare/Documents/work/tpdbfix/app]$ cpan -D Text::CSV Loading internal null logger. Install Log::Log4perl for logging messag +es Reading '/home/ddb/.cpan/Metadata' Database was generated on Wed, 07 Jun 2017 21:41:02 GMT Text::CSV ---------------------------------------------------------------------- +--- (no description) I/IS/ISHIGAKI/Text-CSV-1.95.tar.gz /usr/local/lib/perl5/site_perl/Text/CSV.pm Installed: 1.95 CPAN: 1.95 up to date Kenichi Ishigaki (ISHIGAKI) ishigaki@cpan.org [ddb@playpen ~/smbshare/Documents/work/tpdbfix/app]$ ls -l play-thumbs +.txt readtpexport.\ pl -rwxrwxr-x 1 ddb ddb 874 Jun 7 18:41 play-thumbs.txt -rwxrwxr-x 1 ddb ddb 876 Jun 7 21:05 readtpexport.pl [ddb@playpen ~/smbshare/Documents/work/tpdbfix/app]$ file play-thumbs. +txt play-thumbs.txt: UTF-8 Unicode (with BOM) text, with very long lines [ddb@playpen ~/smbshare/Documents/work/tpdbfix/app]$ [ddb@playpen ~/smbshare/Documents/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/local/lib/perl5/site_perl/m +ach/5.24/Text/CSV_\ XS.pm line 830. at ./readtpexport.pl line 25. [ddb@playpen ~/smbshare/Documents/work/tpdbfix/app]$

In reply to Re: Text::CSV on Unicode file by dd-b
in thread Text::CSV on Unicode file by dd-b

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.