Help for this page

Select Code to Download


  1. or download this
    $ perl -le'
       use Encode qw( encode is_utf8 );
    ...
       print is_utf8(encode("UTF-8", $x))?1:0;
    '
    0
    
  2. or download this
    $ perl -le'
       use LWP::UserAgent;
    ...
             ->get("http://www.microsoft.com/")->content_type;
    '
    text/html charset=utf-8
    
  3. 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
    +">