Test-Simple - Re: How can I enable utf8 layer on diag output

Posted on Wed Jul 23 10:23:31 2008 by mjevans in response to 8370 (See the whole thread of 2)
Re: How can I enable utf8 layer on diag output
ok, I've found out how to do this and why the above does not work. Test::Builder duplicates your STDOUT and STDERR but does not duplicate the layers in use on them - there appears to be code to do this but it is commented out. The way you can do it is:
my $tb = Test::More->builder; binmode($tb->failure_output, ':utf8'); binmode($tb->output, ':utf8');
Write a response