in reply to Re^2: How can I enable utf8 layer on Test::More diag output
in thread How can I enable utf8 layer on Test::More diag output

Here's how you obtain the handles with the same methods you use for setting them:
my $b = Test::More->builder; binmode STDOUT, $b->failure_output, ':utf8';
# both of the following are too late for Test::More # because it has already duplicated STDOUT, STDERR

That's not quite the cause. If it where, the following would work:

BEGIN { binmode STDOUT, ':utf8'; binmode STDERR, ':utf8'; } use Test::More;
however, it doesn't work for me.

still for a general-purpose module I wouldn't assume that the terminal necessarily accepts UTF-8.

Replies are listed 'Best First'.
Re^4: How can I enable utf8 layer on Test::More diag output
by mje (Curate) on Jul 22, 2008 at 15:16 UTC

    Thank you, I had not realised failure_output without any args returns the file handle already in use.

    On the other issue, it is a combination of Test::More duplicating the handles on load AND the fact it does not copy the IO layers when it duplicates them. As a result, I would not expect setting binmode in BEGIN to help.