- or download this
$utf8 = Encode::decode('assumed-encoding-of-s', $s)
- or download this
print unpack("H*", $s);
- or download this
use Encode "encode";
...
printf "%-6s : %s\n", $encoding,
unpack("H*", $a_enc->{$encoding});
}
- or download this
ascii : 3f
cp932 : 82a0
...
ucs2be : 3042
ucs2le : 4230
utf8 : e38182
- or download this
$html_entity = '&#x'.unpack("H*", encode("ucs2be", $ch)).';';