Test::Builder has a problem that when it clones filehandles it does not clone their layers. This means even if you make STDERR and STDOUT utf8 sensitive TB1 won't see that in its dup'd filehandles.
There was an attempt to clone the I/O layers, but it failed due to Perl bugs. This has to be fixed in TB2.
At minimum a method to quickly apply I/O layers to all the output handles.
This issue is also in Google Code with a temporary kludgy fix:
binmode Test::More->builder->output, ":utf8";
binmode Test::More->builder->failure_output, ":utf8";
Which commit represents Test::More 0.98? I'd like to branch off that commit and potentially fix this.
I've also found that using the -CS or PERL_UNICODE='' with Perl 5.14 fixes this too:
$ perl5.14 -CS t/test.t
$ env PERL_UNICODE='' perl5.14 t/test.t
The v0.98 tag is what you're looking for. https://github.com/schwern/test-more/tree/v0.98 But new work would be better done off master. I'll just have to merge it anyway.
See 401fa01. Test::More 0.98 will inherit I/O layers from STDOUT and STDERR IF AND ONLY IF those layers are set before Test::More loads. That's probably why PERL_UNICODE works.
What's your plan?
I think Test::Builder1.5 mitigates this problem well enough to close this.
Test::Builder1.5 delays copying STDOUT and STDERR until they're needed. That gives more space for the test author to set up encodings on them before testing starts.
The Test::More docs have been updated to explain how to deal with this problem.
The todo_output() handle is no longer relevant making it easier to set encodings on just two handles instead of three.