There is not enough information to answer this question (yet).
First of all, all you CSV lines end with a comma. Though this is valid CSV, it is not for a header line, so I would expect that to generate this error:
# CSV_XS ERROR: 1012 - INI - the header contains an empty field @ rec +1 pos 0
Even if there would be no trailing comma's, this error should happen, as there is an empty field between "Path.name" and "Thumbnail.checksum". The documentation is quite clear about that:
If the header is empty, contains more than one unique separato +r out of the allowed set, contains empty fields, or contains identica +l fields (after folding), it will croak with error 1010, 1011, 1012, or +1013 respectively.
Secondly, you'll get your errors more reliable if you'd pass the auto_diag option:
my $csv = Text::CSV ({ binary => 1, auto_diag => 1 });
Thirdly, your data might contain UTF-8 encoded information, but your example does not, so we'd need to know what type of data is where in de header line.
We also want to know what versions of Text::CSV and - if installed - Text::CSV_XS you are using in order to try to reproduce and/or explain.
My guess is that if you add auto_diag and make sure there are no empty fields in the header line, your code might work.
In reply to Re: Text::CSV on Unicode file
by Tux
in thread Text::CSV on Unicode file
by dd-b
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |