14 messages in org.perl.perl-qaRe: Test::Builder versus Unicode
FromSent OnAttachments
OvidDec 20, 2004 4:50 pm 
Michael G SchwernDec 20, 2004 6:06 pm 
David WheelerDec 20, 2004 6:13 pm 
Michael G SchwernDec 20, 2004 6:18 pm 
David WheelerDec 20, 2004 6:20 pm 
chromaticDec 20, 2004 6:27 pm 
Michael G SchwernDec 20, 2004 6:30 pm 
David WheelerDec 20, 2004 6:37 pm 
Michael G SchwernDec 20, 2004 6:41 pm 
David WheelerDec 20, 2004 6:43 pm 
David WheelerDec 22, 2004 10:25 am 
Nicholas ClarkDec 22, 2004 10:45 am 
OvidDec 22, 2004 11:41 am 
Nicholas ClarkDec 22, 2004 11:48 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: Test::Builder versus UnicodeActions...
From:Michael G Schwern (schw@pobox.com)
Date:Dec 20, 2004 6:06:09 pm
List:org.perl.perl-qa

On Mon, Dec 20, 2004 at 04:50:57PM -0800, Ovid wrote:

And looking at line 1005:

sub _print_diag { my $self = shift;

local($\, $", $,) = (undef, ' ', ''); my $fh = $self->todo ? $self->todo_output : $self->failure_output; print $fh @_; # here there be smart quotes }

There are a few strange paths in the code which could be causing this (I'm wondering about the autoflush), but I was wondering if anyone has seen this and knows how to cope with it? As you can see, I've tried that standard binmode ':utf8' and using utf8, but to no avail.

For one, diag() goes to STDERR. But binmode'ing that doesn't work either. It must not survive the filehandle dup Test::Builder does.

This shuts it up.

use Test::Builder; BEGIN {my $fh = Test::Builder->new->failure_output; binmode $fh, ':utf8';}

Test::Builder should do something like this internally, its not like anyone's going to drive binary data through a TB filehandle. The question is how does one do it without breaking older perls?