How can I find out what encoding is used in a text file? A command line utility (or, say, a Perl module) would be great, since I need to use it in a script. Thanks, Jorge Almeida