http://www.perlmonks.org?node_id=699327


in reply to How can I enable utf8 layer on Test::More diag output

Instead of calling diag($data) you probably have to do this:
my $tb = Test::More->builder; $tb->failure_output(\*STDOUT); $tb->diag($data);
Of course you can wrap it in a subroutine.

Update: Alternatively, instead of redefining failure_output, it might be better to just call binmode on it:

my $tb = Test::More->builder; binmode $tb->failure_output, ":utf8"; $tb->diag(...);