Encode-HEBCI
view release on metacpan or search on metacpan
examples/hebci_test.cgi view on Meta::CPAN
888990919293949596979899100101102103104105106107108my
$outstr
=
""
;
if
(
defined
(
$encoding
)) {
my
$tmpstr
= decode(
$encoding
,
$str
);
$outstr
= encode(
"UTF-8"
,
$tmpstr
);
}
<<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 )