use strict; use warnings; use Test::More tests => 12; for my $orig ( "abc", "\xC9ric", "\x{2660}\x{2661}\x{2662}\x{2663}", ) { my $str = $orig; for (0..3) { is multidecode_utf8($str), $orig; utf8::encode($str); } }