"Wide character in ..." is a warning. See "perldiag: Wide character in %s". Please stop calling it an error.
You showed this warning when using Test::More:
Wide character in print at /.../Test2/Formatter/TAP.pm line 125.
I simulated that warning when using Test::More:
Wide character in print at /.../Test2/Formatter/TAP.pm line 156.
The only difference being the line number which I'd guess, in the absence of other information, is due to you using a different version. Test::More and Test2::Formatter::TAP (along with many other modules) are part of the Test-Simple distribution. I'm using:
$ perl -E 'use Test::More; say $Test::More::VERSION;' 1.302195 $ perl -E 'use Test2::Formatter::TAP; say $Test2::Formatter::TAP::VERS +ION;' 1.302195
What version are you using?
My line 156 looks like this:
print $io $ok;
What does your line 125 look like?
I provided you with a solution to your problem by using:
use open OUT => qw{:encoding(UTF-8) :std};
Did you try that? If so, what was the outcome? If not, why not?
The issue here is in no way specific to Test::More. Consider this code which generates the warning:
$ perl -e '
print "\N{DROMEDARY CAMEL}\n";
'
Wide character in print at -e line 2.
🐪
And this code which does not:
$ perl -e '
use open OUT => qw{:encoding(UTF-8) :std};
print "\N{DROMEDARY CAMEL}\n";
'
🐪
— Ken
In reply to Re^4: Listing out the characters included in a character class [wide character warning]
by kcott
in thread Listing out the characters included in a character class
by Polyglot
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |