use HTML::Entities qw( _decode_entities ); print(HTML::Entities::UNICODE_SUPPORT(), "\n"); # Not really, but good enough and avoids warning. binmode(STDOUT, ':encoding(UTF-8)'); my $x = "ř"; _decode_entities($x, {}); print("$x\n"); #### >this_perl script.pl 1 [some char] >that_perl script.pl 0 ř