in reply to Guessing encode text file
(untested)my $characters = eval { decode utf8 => $bytes, Encode::FB_CROAK }; unless (defined $characters) { warn "$filename does not contain valid UTF-8 data, skipping"; next FILE; } # INSERT INTO ...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Guessing encode text file
by karlgoethebier (Abbot) on Jan 20, 2014 at 19:39 UTC |