How about Dan Kogai's Encode::InCharset on CPAN?
http://search.cpan.org/search?dist=Encode-InCharset
Though it doesn't detect the 'narrowest',
it can be checked whether the string could be encoded in a charset.
Damnit, I didn't spot this module in Dan's Legendary Horde of Language
Modules ;-)
sub detectEncode {
my $string = shift;
<snip>
Thanks for the tip!
Best Regards,
--
IT'S TIME FOR A DIFFERENT KIND OF WEB
================================================================
Jean-Michel Hiver - Software Director
jhiver(_at_)mkdoc(_dot_)com
+44 (0)114 255 8097
================================================================
VISIT HTTP://WWW.MKDOC.COM