Fellow QAers,

This script:

  use strict;
  BEGIN { binmode STDERR, ':utf8' }
  use Test::More tests => 1;
  diag "\x{201c}";
  ok 1;

Outputs a warning when it runs:

Wide character in print at /usr/local/lib/perl5/5.8.7/Test/ Builder.pm line 1199.

This is annoying. I had thought that I could get around it by setting the utf8 I/O layer on STDERR before loading Test::Builder, but I guess that Test::More actually closes STDERR and opens it again itself, so the binmode is lost.

Is there any way to get Test::Builder to set an I/O layer on its file handles?

Thanks,

David

Reply via email to