We don't bite newbies here... much | |
PerlMonks |
Re: Guessing encode text fileby aitap (Curate) |
on Jan 20, 2014 at 19:18 UTC ( [id://1071370]=note: print w/replies, xml ) | Need Help?? |
Wouldn't it be more handy to use the error fallback options of the decode function from the standard module Encode? For example, you can set it to throw exception if text cannot be decoded as UTF-8 and catch the exception:
(untested)
In Section
Seekers of Perl Wisdom
|
|