Encode-HEBCI

 view release on metacpan or  search on metacpan

examples/hebci_test.cgi  view on Meta::CPAN

88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
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 3.038 seconds using v1.01-cache-2.11-cpan-95122f20152 )