binmode(STDOUT, ":utf8"); my $bytes = pack "C", 0xE4; # ISO-8859-1, Latin1 print $bytes;