The stupid question is the question not asked | |
PerlMonks |
Re: how to check the encoding of a fileby ysth (Canon) |
on Apr 10, 2006 at 11:16 UTC ( [id://542256]=note: print w/replies, xml ) | Need Help?? |
This came up before in What encoding am I (probably) using?, but it sounds like in your case you are just choosing between latin1 and utf8? If so, the best way may be to just check if it is valid utf8, and only if it
isn't assume it is latin1. You can simply use utf8::decode to do this.
In Section
Seekers of Perl Wisdom
|
|