Encode-HEBCI

 view release on metacpan or  search on metacpan

examples/hebci_test.cgi  view on Meta::CPAN

my $outstr = "";

if(defined($encoding)) {
  my $tmpstr = decode($encoding, $str);
  $outstr = encode("UTF-8", $tmpstr);
}


print <<EOT;

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>Stupid Character Encoding Trick: Inferring Codepage</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>
Results: You're using the encoding "$encoding" !! (but this page is in UTF-8)<br/>
You gave me: $str <br/>
in UTF-8: $outstr <br/>
<form method="GET" ACTION="hebci_test.cgi">



( run in 1.574 second using v1.01-cache-2.11-cpan-49f99fa48dc )