- or download this
$ perl -le'
use Encode qw( encode is_utf8 );
...
print is_utf8(encode("UTF-8", $x))?1:0;
'
0
- or download this
$ perl -le'
use LWP::UserAgent;
...
->get("http://www.microsoft.com/")->content_type;
'
text/html charset=utf-8
- or download this
$ perl -le'
use LWP::UserAgent;
...
print for $html =~ /(<meta[^>]*>)/ig;
'
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1
+">