in reply to Redirecting STDERR to STDOUT with UTF8 layer
However, if you don't close it first, then the ':utf8' layer won't be applied:
#!/usr/bin/perl use strict; use warnings; my $utf8="\xe9"; open STDOUT, ">>:utf8", 'test.txt' or die $!; print "No close: ",$utf8,"\n"; close STDOUT; open STDOUT, ">>:utf8", 'test.txt' or die $!; print "Close: ",$utf8,"\n"; PRINTS: No close: \xe9 (not literally - prints character \xe9, not UTF- +8 encoded) Close: é
Clint
Update: Filed as bug 44703
|
|---|