Think about Loose Coupling | |
PerlMonks |
Re: Perl detect utf8, iso-8859-1 encodingby haukex (Archbishop) |
on Jul 24, 2020 at 13:54 UTC ( [id://11119758]=note: print w/replies, xml ) | Need Help?? |
If you're just trying to tell the difference between those two encodings, then note that a lot of text encoded with Latin1 is not valid UTF-8, so simply attempting to decode it as UTF-8 will already give you a very good hint. I demonstrated this with some code (plus heuristics) in this node.
In Section
Seekers of Perl Wisdom
|
|