use MIME::Decoder; use Encode 'decode'; # only for this particular case I will decode QP manually my $d = new MIME::Decoder 'quoted-printable'; # usual way of obtaining bytes decoded from # QP/Base64/7bit/other content-transfer-encodings # is to use MIME::Body methods # encode unicode characters to UTF-8 on printing binmode STDOUT, ":utf8"; # open an in-memory filehandle # since MIME::Decoder only supports filehandles open my $fh, ">", \(my $bytes); # decode the quoted-printable $d->decode(\*DATA, $fh); # decode the bytes my $characters = decode 'utf-8' => $bytes; # prove having 1 character, not 4 bytes while ($characters =~ /(.)/g) { printf "%s is unicode character %x\n",$1,(unpack"W",$1); } __DATA__ =F0=9F=98=B3