HTML::Encoding helps to determine the encoding of HTML and XML/XHTML documents. WWW: http://search.cpan.org/dist/HTML-Encoding/