Posted on 2008-07-23 07:23:31-07 by mjevans in response to 8370
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');
Direct Responses: Write a response
Perl Weekly newsletter
A free weekly newsletter for people who are busy to read all the blogs. click here to check it out.