- or download this
use Encode;
...
$x = chr(65533);
$y = Encode::encode('utf-8', $x); # -> "\x{aa}\x{42}\x{fe}"
- or download this
$y = Encode::decode('some encoding', $x);
binmode STDOUT, ":bytes"; print $x;
...
- or download this
$y = Encode::encode('some encoding', $x);
$n = rindex($x, "\N{WHITE SMILEY FACE}"); # need: use charnames ':full
+';
...